From a9b6aca253c2b30a3114583d4a54992e21669916 Mon Sep 17 00:00:00 2001 From: Andreas Berthoud Date: Sun, 4 Jul 2021 12:00:27 +0200 Subject: [PATCH] ble-dongle: Implement blinky --- download.py | 3 +- nucleo-wb55-dongle-ble/.mxproject | 16 ++++---- nucleo-wb55-dongle-ble/Core/Inc/main.h | 6 +++ nucleo-wb55-dongle-ble/Core/Src/main.c | 41 +++++++++++++++++++ .../nucleo-wb55-dongle-ble.ioc | 21 ++++++++-- 5 files changed, 75 insertions(+), 12 deletions(-) diff --git a/download.py b/download.py index 841d62f..36007fa 100644 --- a/download.py +++ b/download.py @@ -7,7 +7,8 @@ logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger("Download") -APPLICATION_NAME = "nucleo-wb55-dongle-usb" +APPLICATION_NAME = "nucleo-wb55-dongle-ble" +#APPLICATION_NAME = "nucleo-wb55-dongle-usb" #APPLICATION_NAME = "nucleo-wb55-dongle-blinky" PORT="USB1" CLI_PATH = Path("/Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin/STM32_Programmer_CLI") diff --git a/nucleo-wb55-dongle-ble/.mxproject b/nucleo-wb55-dongle-ble/.mxproject index 8255681..341d453 100644 --- a/nucleo-wb55-dongle-ble/.mxproject +++ b/nucleo-wb55-dongle-ble/.mxproject @@ -1,3 +1,11 @@ +[PreviousLibFiles] +LibFiles=Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_tim.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_tim_ex.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_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_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_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/Src/stm32wbxx_hal_tim.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_tim_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_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_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/Inc/stm32wbxx_hal_tim.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_tim_ex.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_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_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_hal_def.h;Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.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/Source/Templates/system_stm32wbxx.c;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/tz_context.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/cmsis_compiler.h;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/core_cm35p.h;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/core_armv81mml.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_cm1.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_armv8mbl.h;Drivers/CMSIS/Include/cmsis_armclang_ltm.h; + +[PreviousUsedCubeIDEFiles] +SourceFiles=Core/Src/main.c;Core/Src/stm32wbxx_it.c;Core/Src/stm32wbxx_hal_msp.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_tim.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_tim_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_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_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;Core/Src/system_stm32wbxx.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_tim.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_tim_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_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_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;Core/Src/system_stm32wbxx.c;Drivers/CMSIS/Device/ST/STM32WBxx/Source/Templates/system_stm32wbxx.c;; +HeaderPath=Drivers/STM32WBxx_HAL_Driver/Inc;Drivers/STM32WBxx_HAL_Driver/Inc/Legacy;Drivers/CMSIS/Device/ST/STM32WBxx/Include;Drivers/CMSIS/Include;Core/Inc; +CDefines=USE_HAL_DRIVER;STM32WB55xx;USE_HAL_DRIVER;USE_HAL_DRIVER; + [PreviousGenFiles] AdvancedFolderStructure=true HeaderFileListSize=3 @@ -15,11 +23,3 @@ SourceFolderListSize=1 SourcePath#0=/Users/andreaslinggi/Documents/git/nucleo-playground-workspace/nucleo-wb55-dongle-ble/Core/Src SourceFiles=; -[PreviousLibFiles] -LibFiles=Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_tim.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_tim_ex.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_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_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_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/Src/stm32wbxx_hal_tim.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_tim_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_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_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/Inc/stm32wbxx_hal_tim.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_tim_ex.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_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_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_hal_def.h;Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.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/Source/Templates/system_stm32wbxx.c;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/tz_context.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/cmsis_compiler.h;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/core_cm35p.h;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/core_armv81mml.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_cm1.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_armv8mbl.h;Drivers/CMSIS/Include/cmsis_armclang_ltm.h; - -[PreviousUsedCubeIDEFiles] -SourceFiles=Core/Src/main.c;Core/Src/stm32wbxx_it.c;Core/Src/stm32wbxx_hal_msp.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_tim.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_tim_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_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_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;Core/Src/system_stm32wbxx.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_tim.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_tim_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_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_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;Core/Src/system_stm32wbxx.c;Drivers/CMSIS/Device/ST/STM32WBxx/Source/Templates/system_stm32wbxx.c;; -HeaderPath=Drivers/STM32WBxx_HAL_Driver/Inc;Drivers/STM32WBxx_HAL_Driver/Inc/Legacy;Drivers/CMSIS/Device/ST/STM32WBxx/Include;Drivers/CMSIS/Include;Core/Inc; -CDefines=USE_HAL_DRIVER;STM32WB55xx;USE_HAL_DRIVER;USE_HAL_DRIVER; - diff --git a/nucleo-wb55-dongle-ble/Core/Inc/main.h b/nucleo-wb55-dongle-ble/Core/Inc/main.h index a579cc6..4d4b97b 100644 --- a/nucleo-wb55-dongle-ble/Core/Inc/main.h +++ b/nucleo-wb55-dongle-ble/Core/Inc/main.h @@ -58,6 +58,12 @@ void Error_Handler(void); /* USER CODE END EFP */ /* Private defines -----------------------------------------------------------*/ +#define LED_BLUE_Pin GPIO_PIN_4 +#define LED_BLUE_GPIO_Port GPIOA +#define LED_GREEN_Pin GPIO_PIN_0 +#define LED_GREEN_GPIO_Port GPIOB +#define LED_RED_Pin GPIO_PIN_1 +#define LED_RED_GPIO_Port GPIOB /* USER CODE BEGIN Private defines */ /* USER CODE END Private defines */ diff --git a/nucleo-wb55-dongle-ble/Core/Src/main.c b/nucleo-wb55-dongle-ble/Core/Src/main.c index 1fd9d54..0a785ed 100644 --- a/nucleo-wb55-dongle-ble/Core/Src/main.c +++ b/nucleo-wb55-dongle-ble/Core/Src/main.c @@ -47,6 +47,7 @@ /* Private function prototypes -----------------------------------------------*/ void SystemClock_Config(void); +static void MX_GPIO_Init(void); /* USER CODE BEGIN PFP */ /* USER CODE END PFP */ @@ -83,6 +84,7 @@ int main(void) /* USER CODE END SysInit */ /* Initialize all configured peripherals */ + MX_GPIO_Init(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ @@ -91,6 +93,10 @@ int main(void) /* USER CODE BEGIN WHILE */ while (1) { + HAL_GPIO_WritePin(LED_GREEN_GPIO_Port, LED_GREEN_Pin, GPIO_PIN_SET); + HAL_Delay(50); + HAL_GPIO_WritePin(LED_GREEN_GPIO_Port, LED_GREEN_Pin, GPIO_PIN_RESET); + HAL_Delay(50); /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ @@ -155,6 +161,41 @@ void SystemClock_Config(void) /* USER CODE END Smps */ } +/** + * @brief GPIO Initialization Function + * @param None + * @retval None + */ +static void MX_GPIO_Init(void) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; + + /* GPIO Ports Clock Enable */ + __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_GPIOB_CLK_ENABLE(); + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(LED_BLUE_GPIO_Port, LED_BLUE_Pin, GPIO_PIN_RESET); + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(GPIOB, LED_GREEN_Pin|LED_RED_Pin, GPIO_PIN_RESET); + + /*Configure GPIO pin : LED_BLUE_Pin */ + GPIO_InitStruct.Pin = LED_BLUE_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + HAL_GPIO_Init(LED_BLUE_GPIO_Port, &GPIO_InitStruct); + + /*Configure GPIO pins : LED_GREEN_Pin LED_RED_Pin */ + GPIO_InitStruct.Pin = LED_GREEN_Pin|LED_RED_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + +} + /* USER CODE BEGIN 4 */ /* USER CODE END 4 */ diff --git a/nucleo-wb55-dongle-ble/nucleo-wb55-dongle-ble.ioc b/nucleo-wb55-dongle-ble/nucleo-wb55-dongle-ble.ioc index ee5bb75..9decae3 100644 --- a/nucleo-wb55-dongle-ble/nucleo-wb55-dongle-ble.ioc +++ b/nucleo-wb55-dongle-ble/nucleo-wb55-dongle-ble.ioc @@ -9,13 +9,14 @@ RCC.SAI1Freq_Value=48000000 RCC.CortexFreq_Value=4000000 ProjectManager.KeepUserCode=true Mcu.UserName=STM32WB55CGUx -Mcu.PinsNb=1 +Mcu.PinsNb=4 ProjectManager.NoMain=false RCC.RFWKPFreq_Value=976.5625 RCC.HCLK3Freq_Value=4000000 RCC.PLLSAI1RoutputFreq_Value=48000000 -ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false +ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false ProjectManager.DefaultFWLocation=true +PB0.GPIO_Label=LED_GREEN ProjectManager.DeletePrevious=true RCC.HCLK2Freq_Value=4000000 boardIOC=true @@ -45,13 +46,18 @@ RCC.USBFreq_Value=48000000 RCC.LSE_VALUE=32768 RCC.AHBFreq_Value=4000000 RCC.PLLSAI1PoutputFreq_Value=48000000 -Mcu.Pin0=VP_SYS_VS_Systick +Mcu.Pin0=PA4 +PB1.Locked=true +Mcu.Pin1=PB0 +Mcu.Pin2=PB1 +Mcu.Pin3=VP_SYS_VS_Systick ProjectManager.ProjectBuild=false RCC.HSE_VALUE=32000000 RCC.FCLK2Freq_Value=4000000 NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false board=P-NUCLEO-WB55-USBDongle +PA4.Locked=true RCC.Cortex2Freq_Value=4000000 RCC.VCOOutputFreq_Value=128000000 NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true @@ -59,6 +65,7 @@ ProjectManager.LastFirmware=true RCC.SMPS1Freq_Value=16000000 ProjectManager.FirmwarePackage=STM32Cube FW_WB V1.11.1 MxDb.Version=DB.6.0.21 +PB0.GPIOParameters=GPIO_Label RCC.APB2Freq_Value=4000000 ProjectManager.BackupPrevious=false MxCube.Version=6.2.1 @@ -66,12 +73,14 @@ RCC.VCOInputFreq_Value=4000000 PCC.Ble.DataLength=6 RCC.I2C1Freq_Value=4000000 RCC.RNGFreq_Value=32000 +PB1.GPIO_Label=LED_RED RCC.PLLSAI1QoutputFreq_Value=48000000 RCC.ADCFreq_Value=48000000 File.Version=6 VP_SYS_VS_Systick.Mode=SysTick NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false RCC.PLLRCLKFreq_Value=64000000 +PA4.GPIOParameters=GPIO_Label NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false ProjectManager.FreePins=false RCC.IPParameters=ADCFreq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,APB3Freq_Value,Cortex2Freq_Value,CortexFreq_Value,FCLK2Freq_Value,FCLKCortexFreq_Value,FamilyName,HCLK2Freq_Value,HCLK3Freq_Value,HCLKFreq_Value,HCLKRFFreq_Value,HSE_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C3Freq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSE_VALUE,LSI_VALUE,MCO1PinFreq_Value,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSAI1N,PLLSAI1PoutputFreq_Value,PLLSAI1QoutputFreq_Value,PLLSAI1RoutputFreq_Value,PWRFreq_Value,RFWKPFreq_Value,RNGFreq_Value,SAI1Freq_Value,SMPS1Freq_Value,SMPSDivider,SYSCLKFreq_VALUE,USART1Freq_Value,USBFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAI1OutputFreq_Value @@ -79,12 +88,15 @@ ProjectManager.AskForMigrate=true Mcu.Name=STM32WB55CGUx RCC.LPTIM2Freq_Value=4000000 ProjectManager.HalAssertFull=false +PB0.Locked=true ProjectManager.ProjectName=nucleo-wb55-dongle-ble ProjectManager.UnderRoot=true RCC.APB3Freq_Value=16000000 ProjectManager.CoupleFile=false +PA4.Signal=GPIO_Output RCC.SYSCLKFreq_VALUE=4000000 Mcu.Package=UFQFPN48 +PB1.Signal=GPIO_Output PCC.Ble.ConnectionInterval=1000.0 NVIC.ForceEnableDMAVector=true KeepUserPlacement=false @@ -107,9 +119,12 @@ RCC.PWRFreq_Value=4000000 RCC.LPUART1Freq_Value=4000000 RCC.APB1Freq_Value=4000000 RCC.SMPSDivider=1 +PB0.Signal=GPIO_Output +PA4.GPIO_Label=LED_BLUE ProjectManager.CustomerFirmwarePackage= ProjectManager.DeviceId=STM32WB55CGUx ProjectManager.LibraryCopy=1 RCC.HSI48_VALUE=48000000 RCC.PLLSAI1N=24 +PB1.GPIOParameters=GPIO_Label isbadioc=false