From 2a2bc1490e77baf1fabf04d07ccc8cede8e70350 Mon Sep 17 00:00:00 2001 From: Caio Date: Fri, 18 Apr 2025 21:23:49 -0400 Subject: [PATCH 1/5] swapped buttons to correct order --- .mxproject | 22 +- Core/Inc/main.h | 22 +- Core/Src/main.c | 12 +- Core/Src/stm32f4xx_it.c | 8 +- .../Src/stm32f4xx_hal_can.c | 1 - Polyphemus.ioc | 496 +++++++++--------- 6 files changed, 280 insertions(+), 281 deletions(-) diff --git a/.mxproject b/.mxproject index 06e9ba0..2ff9c74 100644 --- a/.mxproject +++ b/.mxproject @@ -1,5 +1,5 @@ [PreviousLibFiles] -LibFiles=Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_can.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_bus.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_rcc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_system.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_utils.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_gpio.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_dma.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_dmamux.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_pwr.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_cortex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h;Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_exti.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_usart.h;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_can.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_bus.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_rcc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_system.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_utils.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_gpio.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_dma.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_dmamux.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_pwr.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_cortex.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h;Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_exti.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h;Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_usart.h;Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f405xx.h;Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h;Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h;Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h;Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/core_cm35p.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/pmu_armv8.h;Drivers/CMSIS/Include/cachel1_armv7.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_armv8mbl.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/core_cm1.h;Drivers/CMSIS/Include/core_cm55.h;Drivers/CMSIS/Include/cmsis_armclang_ltm.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/Include/core_starmc1.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/core_cm85.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/core_armv81mml.h;Drivers/CMSIS/Include/cmsis_compiler.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/tz_context.h;Drivers/CMSIS/Include/pac_armv81.h; +LibFiles=Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_can.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_bus.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_system.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_utils.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dmamux.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usart.h;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_can.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_can.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_bus.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_system.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_utils.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dmamux.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usart.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f405xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\system_stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\system_stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Drivers\CMSIS\Include\cachel1_armv7.h;Drivers\CMSIS\Include\cmsis_armcc.h;Drivers\CMSIS\Include\cmsis_armclang.h;Drivers\CMSIS\Include\cmsis_armclang_ltm.h;Drivers\CMSIS\Include\cmsis_compiler.h;Drivers\CMSIS\Include\cmsis_gcc.h;Drivers\CMSIS\Include\cmsis_iccarm.h;Drivers\CMSIS\Include\cmsis_version.h;Drivers\CMSIS\Include\core_armv81mml.h;Drivers\CMSIS\Include\core_armv8mbl.h;Drivers\CMSIS\Include\core_armv8mml.h;Drivers\CMSIS\Include\core_cm0.h;Drivers\CMSIS\Include\core_cm0plus.h;Drivers\CMSIS\Include\core_cm1.h;Drivers\CMSIS\Include\core_cm23.h;Drivers\CMSIS\Include\core_cm3.h;Drivers\CMSIS\Include\core_cm33.h;Drivers\CMSIS\Include\core_cm35p.h;Drivers\CMSIS\Include\core_cm4.h;Drivers\CMSIS\Include\core_cm55.h;Drivers\CMSIS\Include\core_cm7.h;Drivers\CMSIS\Include\core_cm85.h;Drivers\CMSIS\Include\core_sc000.h;Drivers\CMSIS\Include\core_sc300.h;Drivers\CMSIS\Include\core_starmc1.h;Drivers\CMSIS\Include\mpu_armv7.h;Drivers\CMSIS\Include\mpu_armv8.h;Drivers\CMSIS\Include\pac_armv81.h;Drivers\CMSIS\Include\pmu_armv8.h;Drivers\CMSIS\Include\tz_context.h; [PreviousUsedIarFiles] SourceFiles=../Core/Src/main.c;../Core/Src/stm32f4xx_it.c;../Core/Src/stm32f4xx_hal_msp.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c;../Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c;../Core/Src/system_stm32f4xx.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c;../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c;../Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c;../Core/Src/system_stm32f4xx.c;;; @@ -7,24 +7,24 @@ HeaderPath=../Drivers/STM32F4xx_HAL_Driver/Inc;../Drivers/STM32F4xx_HAL_Driver/I CDefines=USE_HAL_DRIVER;STM32F405xx;USE_HAL_DRIVER;USE_HAL_DRIVER; [PreviousUsedMakefileFiles] -SourceFiles=Core/Src/main.c;Core/Src/stm32f4xx_it.c;Core/Src/stm32f4xx_hal_msp.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c;Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c;Core/Src/system_stm32f4xx.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c;Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c;Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c;Core/Src/system_stm32f4xx.c;;; -HeaderPath=Drivers/STM32F4xx_HAL_Driver/Inc;Drivers/STM32F4xx_HAL_Driver/Inc/Legacy;Drivers/CMSIS/Device/ST/STM32F4xx/Include;Drivers/CMSIS/Include;Core/Inc; +SourceFiles=Core\Src\main.c;Core\Src\stm32f4xx_it.c;Core\Src\stm32f4xx_hal_msp.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_can.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Core\Src\system_stm32f4xx.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_can.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Core\Src\system_stm32f4xx.c;;; +HeaderPath=Drivers\STM32F4xx_HAL_Driver\Inc;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy;Drivers\CMSIS\Device\ST\STM32F4xx\Include;Drivers\CMSIS\Include;Core\Inc; CDefines=USE_HAL_DRIVER;STM32F405xx;USE_HAL_DRIVER;USE_HAL_DRIVER; [PreviousGenFiles] AdvancedFolderStructure=true HeaderFileListSize=3 -HeaderFiles#0=../Core/Inc/stm32f4xx_it.h -HeaderFiles#1=../Core/Inc/stm32f4xx_hal_conf.h -HeaderFiles#2=../Core/Inc/main.h +HeaderFiles#0=..\Core\Inc\stm32f4xx_it.h +HeaderFiles#1=..\Core\Inc\stm32f4xx_hal_conf.h +HeaderFiles#2=..\Core\Inc\main.h HeaderFolderListSize=1 -HeaderPath#0=../Core/Inc +HeaderPath#0=..\Core\Inc HeaderFiles=; SourceFileListSize=3 -SourceFiles#0=../Core/Src/stm32f4xx_it.c -SourceFiles#1=../Core/Src/stm32f4xx_hal_msp.c -SourceFiles#2=../Core/Src/main.c +SourceFiles#0=..\Core\Src\stm32f4xx_it.c +SourceFiles#1=..\Core\Src\stm32f4xx_hal_msp.c +SourceFiles#2=..\Core\Src\main.c SourceFolderListSize=1 -SourcePath#0=../Core/Src +SourcePath#0=..\Core\Src SourceFiles=; diff --git a/Core/Inc/main.h b/Core/Inc/main.h index abf3c27..cbd2fd5 100644 --- a/Core/Inc/main.h +++ b/Core/Inc/main.h @@ -60,24 +60,24 @@ void Error_Handler(void); #define Button_1_Pin GPIO_PIN_2 #define Button_1_GPIO_Port GPIOA #define Button_1_EXTI_IRQn EXTI2_IRQn -#define Button_Spare_Pin GPIO_PIN_3 -#define Button_Spare_GPIO_Port GPIOA -#define Button_Spare_EXTI_IRQn EXTI3_IRQn -#define Button_5_Pin GPIO_PIN_0 -#define Button_5_GPIO_Port GPIOB -#define Button_5_EXTI_IRQn EXTI0_IRQn -#define Button_6_Pin GPIO_PIN_1 +#define Button_4_Pin GPIO_PIN_3 +#define Button_4_GPIO_Port GPIOA +#define Button_4_EXTI_IRQn EXTI3_IRQn +#define Button_6_Pin GPIO_PIN_0 #define Button_6_GPIO_Port GPIOB -#define Button_6_EXTI_IRQn EXTI1_IRQn +#define Button_6_EXTI_IRQn EXTI0_IRQn +#define Button_5_Pin GPIO_PIN_1 +#define Button_5_GPIO_Port GPIOB +#define Button_5_EXTI_IRQn EXTI1_IRQn #define Button_2_Pin GPIO_PIN_10 #define Button_2_GPIO_Port GPIOB #define Button_2_EXTI_IRQn EXTI15_10_IRQn #define Button_3_Pin GPIO_PIN_11 #define Button_3_GPIO_Port GPIOB #define Button_3_EXTI_IRQn EXTI15_10_IRQn -#define Button_4_Pin GPIO_PIN_12 -#define Button_4_GPIO_Port GPIOB -#define Button_4_EXTI_IRQn EXTI15_10_IRQn +#define Button_Spare_Pin GPIO_PIN_12 +#define Button_Spare_GPIO_Port GPIOB +#define Button_Spare_EXTI_IRQn EXTI15_10_IRQn #define Switch_4_Pin GPIO_PIN_13 #define Switch_4_GPIO_Port GPIOB #define Switch_4_EXTI_IRQn EXTI15_10_IRQn diff --git a/Core/Src/main.c b/Core/Src/main.c index 6bca88d..9c548d8 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -279,17 +279,17 @@ static void MX_GPIO_Init(void) /*Configure GPIO pin Output Level */ HAL_GPIO_WritePin(GPIOC, Debug_LED_1_Pin|Debug_LED_2_Pin, GPIO_PIN_RESET); - /*Configure GPIO pins : Button_1_Pin Button_Spare_Pin */ - GPIO_InitStruct.Pin = Button_1_Pin|Button_Spare_Pin; + /*Configure GPIO pins : Button_1_Pin Button_4_Pin */ + GPIO_InitStruct.Pin = Button_1_Pin|Button_4_Pin; GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - /*Configure GPIO pins : Button_5_Pin Button_6_Pin Button_2_Pin Button_3_Pin - Button_4_Pin Switch_4_Pin Switch_5_Pin Switch_1_Pin + /*Configure GPIO pins : Button_6_Pin Button_5_Pin Button_2_Pin Button_3_Pin + Button_Spare_Pin Switch_4_Pin Switch_5_Pin Switch_1_Pin Switch_2_Pin Switch_3_Pin */ - GPIO_InitStruct.Pin = Button_5_Pin|Button_6_Pin|Button_2_Pin|Button_3_Pin - |Button_4_Pin|Switch_4_Pin|Switch_5_Pin|Switch_1_Pin + GPIO_InitStruct.Pin = Button_6_Pin|Button_5_Pin|Button_2_Pin|Button_3_Pin + |Button_Spare_Pin|Switch_4_Pin|Switch_5_Pin|Switch_1_Pin |Switch_2_Pin|Switch_3_Pin; GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; GPIO_InitStruct.Pull = GPIO_NOPULL; diff --git a/Core/Src/stm32f4xx_it.c b/Core/Src/stm32f4xx_it.c index 89ecf11..c39580d 100644 --- a/Core/Src/stm32f4xx_it.c +++ b/Core/Src/stm32f4xx_it.c @@ -206,7 +206,7 @@ void EXTI0_IRQHandler(void) /* USER CODE BEGIN EXTI0_IRQn 0 */ /* USER CODE END EXTI0_IRQn 0 */ - HAL_GPIO_EXTI_IRQHandler(Button_5_Pin); + HAL_GPIO_EXTI_IRQHandler(Button_6_Pin); /* USER CODE BEGIN EXTI0_IRQn 1 */ /* USER CODE END EXTI0_IRQn 1 */ @@ -220,7 +220,7 @@ void EXTI1_IRQHandler(void) /* USER CODE BEGIN EXTI1_IRQn 0 */ /* USER CODE END EXTI1_IRQn 0 */ - HAL_GPIO_EXTI_IRQHandler(Button_6_Pin); + HAL_GPIO_EXTI_IRQHandler(Button_5_Pin); /* USER CODE BEGIN EXTI1_IRQn 1 */ /* USER CODE END EXTI1_IRQn 1 */ @@ -248,7 +248,7 @@ void EXTI3_IRQHandler(void) /* USER CODE BEGIN EXTI3_IRQn 0 */ /* USER CODE END EXTI3_IRQn 0 */ - HAL_GPIO_EXTI_IRQHandler(Button_Spare_Pin); + HAL_GPIO_EXTI_IRQHandler(Button_4_Pin); /* USER CODE BEGIN EXTI3_IRQn 1 */ /* USER CODE END EXTI3_IRQn 1 */ @@ -280,7 +280,7 @@ void EXTI15_10_IRQHandler(void) /* USER CODE END EXTI15_10_IRQn 0 */ HAL_GPIO_EXTI_IRQHandler(Button_2_Pin); HAL_GPIO_EXTI_IRQHandler(Button_3_Pin); - HAL_GPIO_EXTI_IRQHandler(Button_4_Pin); + HAL_GPIO_EXTI_IRQHandler(Button_Spare_Pin); HAL_GPIO_EXTI_IRQHandler(Switch_4_Pin); HAL_GPIO_EXTI_IRQHandler(Switch_5_Pin); /* USER CODE BEGIN EXTI15_10_IRQn 1 */ diff --git a/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c b/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c index 0164470..6ea69fa 100644 --- a/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c +++ b/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c @@ -330,7 +330,6 @@ HAL_StatusTypeDef HAL_CAN_Init(CAN_HandleTypeDef *hcan) HAL_CAN_MspInit(hcan); } #endif /* USE_HAL_CAN_REGISTER_CALLBACKS */ - CLEAR_BIT(hcan->Instance->MCR, CAN_MCR_SLEEP); /* Request initialisation */ SET_BIT(hcan->Instance->MCR, CAN_MCR_INRQ); diff --git a/Polyphemus.ioc b/Polyphemus.ioc index a15f1d6..39b0870 100644 --- a/Polyphemus.ioc +++ b/Polyphemus.ioc @@ -1,248 +1,248 @@ -#MicroXplorer Configuration settings - do not modify -CAD.formats= -CAD.pinconfig= -CAD.provider= -CAN1.BS1=CAN_BS1_11TQ -CAN1.BS2=CAN_BS2_2TQ -CAN1.CalculateBaudRate=500000 -CAN1.CalculateTimeBit=2000 -CAN1.CalculateTimeQuantum=142.85714285714286 -CAN1.IPParameters=CalculateTimeQuantum,CalculateTimeBit,CalculateBaudRate,BS1,Prescaler,BS2 -CAN1.Prescaler=6 -File.Version=6 -GPIO.groupedBy=Group By Peripherals -KeepUserPlacement=false -Mcu.CPN=STM32F405RGT6V -Mcu.Family=STM32F4 -Mcu.IP0=CAN1 -Mcu.IP1=NVIC -Mcu.IP2=RCC -Mcu.IP3=SYS -Mcu.IP4=USART3 -Mcu.IPNb=5 -Mcu.Name=STM32F405RGTx -Mcu.Package=LQFP64 -Mcu.Pin0=PH0-OSC_IN -Mcu.Pin1=PH1-OSC_OUT -Mcu.Pin10=PB14 -Mcu.Pin11=PC8 -Mcu.Pin12=PC9 -Mcu.Pin13=PA13 -Mcu.Pin14=PA14 -Mcu.Pin15=PA15 -Mcu.Pin16=PC10 -Mcu.Pin17=PC11 -Mcu.Pin18=PB3 -Mcu.Pin19=PB5 -Mcu.Pin2=PA2 -Mcu.Pin20=PB6 -Mcu.Pin21=PB7 -Mcu.Pin22=PB8 -Mcu.Pin23=PB9 -Mcu.Pin24=VP_SYS_VS_Systick -Mcu.Pin3=PA3 -Mcu.Pin4=PB0 -Mcu.Pin5=PB1 -Mcu.Pin6=PB10 -Mcu.Pin7=PB11 -Mcu.Pin8=PB12 -Mcu.Pin9=PB13 -Mcu.PinsNb=25 -Mcu.ThirdPartyNb=0 -Mcu.UserConstants= -Mcu.UserName=STM32F405RGTx -MxCube.Version=6.13.0 -MxDb.Version=DB.6.0.130 -NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -NVIC.EXTI0_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true -NVIC.EXTI15_10_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true -NVIC.EXTI1_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true -NVIC.EXTI2_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true -NVIC.EXTI3_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true -NVIC.EXTI9_5_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true -NVIC.ForceEnableDMAVector=true -NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 -NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:false -NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -PA13.Mode=JTAG_4_pins -PA13.Signal=SYS_JTMS-SWDIO -PA14.Mode=JTAG_4_pins -PA14.Signal=SYS_JTCK-SWCLK -PA15.Mode=JTAG_4_pins -PA15.Signal=SYS_JTDI -PA2.GPIOParameters=GPIO_Label -PA2.GPIO_Label=Button_1 -PA2.Locked=true -PA2.Signal=GPXTI2 -PA3.GPIOParameters=GPIO_Label -PA3.GPIO_Label=Button_Spare -PA3.Locked=true -PA3.Signal=GPXTI3 -PB0.GPIOParameters=GPIO_Label -PB0.GPIO_Label=Button_5 -PB0.Locked=true -PB0.Signal=GPXTI0 -PB1.GPIOParameters=GPIO_Label -PB1.GPIO_Label=Button_6 -PB1.Locked=true -PB1.Signal=GPXTI1 -PB10.GPIOParameters=GPIO_Label -PB10.GPIO_Label=Button_2 -PB10.Locked=true -PB10.Signal=GPXTI10 -PB11.GPIOParameters=GPIO_Label -PB11.GPIO_Label=Button_3 -PB11.Locked=true -PB11.Signal=GPXTI11 -PB12.GPIOParameters=GPIO_Label -PB12.GPIO_Label=Button_4 -PB12.Locked=true -PB12.Signal=GPXTI12 -PB13.GPIOParameters=GPIO_Label -PB13.GPIO_Label=Switch_4 -PB13.Locked=true -PB13.Signal=GPXTI13 -PB14.GPIOParameters=GPIO_Label -PB14.GPIO_Label=Switch_5 -PB14.Locked=true -PB14.Signal=GPXTI14 -PB3.Mode=JTAG_4_pins -PB3.Signal=SYS_JTDO-SWO -PB5.GPIOParameters=GPIO_Label -PB5.GPIO_Label=Switch_1 -PB5.Locked=true -PB5.Signal=GPXTI5 -PB6.GPIOParameters=GPIO_Label -PB6.GPIO_Label=Switch_2 -PB6.Locked=true -PB6.Signal=GPXTI6 -PB7.GPIOParameters=GPIO_Label -PB7.GPIO_Label=Switch_3 -PB7.Locked=true -PB7.Signal=GPXTI7 -PB8.Locked=true -PB8.Mode=CAN_Activate -PB8.Signal=CAN1_RX -PB9.Locked=true -PB9.Mode=CAN_Activate -PB9.Signal=CAN1_TX -PC10.Locked=true -PC10.Mode=Asynchronous -PC10.Signal=USART3_TX -PC11.Locked=true -PC11.Mode=Asynchronous -PC11.Signal=USART3_RX -PC8.GPIOParameters=GPIO_Label -PC8.GPIO_Label=Debug_LED_1 -PC8.Locked=true -PC8.Signal=GPIO_Output -PC9.GPIOParameters=GPIO_Label -PC9.GPIO_Label=Debug_LED_2 -PC9.Locked=true -PC9.Signal=GPIO_Output -PH0-OSC_IN.Mode=HSE-External-Clock-Source -PH0-OSC_IN.Signal=RCC_OSC_IN -PH1-OSC_OUT.Mode=HSE-External-Clock-Source -PH1-OSC_OUT.Signal=RCC_OSC_OUT -PinOutPanel.RotationAngle=0 -ProjectManager.AskForMigrate=true -ProjectManager.BackupPrevious=false -ProjectManager.CompilerOptimize=6 -ProjectManager.ComputerToolchain=false -ProjectManager.CoupleFile=false -ProjectManager.CustomerFirmwarePackage= -ProjectManager.DefaultFWLocation=true -ProjectManager.DeletePrevious=true -ProjectManager.DeviceId=STM32F405RGTx -ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.28.1 -ProjectManager.FreePins=false -ProjectManager.HalAssertFull=false -ProjectManager.HeapSize=0x200 -ProjectManager.KeepUserCode=true -ProjectManager.LastFirmware=true -ProjectManager.LibraryCopy=1 -ProjectManager.MainLocation=Core/Src -ProjectManager.NoMain=false -ProjectManager.PreviousToolchain= -ProjectManager.ProjectBuild=false -ProjectManager.ProjectFileName=Polyphemus.ioc -ProjectManager.ProjectName=Polyphemus -ProjectManager.ProjectStructure= -ProjectManager.RegisterCallBack= -ProjectManager.StackSize=0x400 -ProjectManager.TargetToolchain=Makefile -ProjectManager.ToolChainLocation= -ProjectManager.UAScriptAfterPath= -ProjectManager.UAScriptBeforePath= -ProjectManager.UnderRoot=false -ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_CAN1_Init-CAN1-false-HAL-true,4-MX_USART3_UART_Init-USART3-false-HAL-true -RCC.48MHZClocksFreq_Value=42000000 -RCC.AHBFreq_Value=84000000 -RCC.APB1CLKDivider=RCC_HCLK_DIV2 -RCC.APB1Freq_Value=42000000 -RCC.APB1TimFreq_Value=84000000 -RCC.APB2CLKDivider=RCC_HCLK_DIV4 -RCC.APB2Freq_Value=21000000 -RCC.APB2TimFreq_Value=42000000 -RCC.CortexFreq_Value=84000000 -RCC.EthernetFreq_Value=84000000 -RCC.FCLKCortexFreq_Value=84000000 -RCC.FamilyName=M -RCC.HCLKFreq_Value=84000000 -RCC.HSE_VALUE=8000000 -RCC.HSI_VALUE=16000000 -RCC.I2SClocksFreq_Value=192000000 -RCC.IPParameters=48MHZClocksFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2CLKDivider,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,EthernetFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2SClocksFreq_Value,LSE_VALUE,LSI_VALUE,MCO2PinFreq_Value,PLLCLKFreq_Value,PLLM,PLLMCOFreq_Value,PLLN,PLLQCLKFreq_Value,PLLSourceVirtual,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VcooutputI2S -RCC.LSE_VALUE=32768 -RCC.LSI_VALUE=32000 -RCC.MCO2PinFreq_Value=84000000 -RCC.PLLCLKFreq_Value=84000000 -RCC.PLLM=4 -RCC.PLLMCOFreq_Value=4000000 -RCC.PLLN=84 -RCC.PLLQCLKFreq_Value=42000000 -RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE -RCC.RTCFreq_Value=32000 -RCC.RTCHSEDivFreq_Value=4000000 -RCC.SYSCLKFreq_VALUE=84000000 -RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK -RCC.TimSysFreq_Value=8000000 -RCC.VCOI2SOutputFreq_Value=384000000 -RCC.VCOInputFreq_Value=2000000 -RCC.VCOOutputFreq_Value=168000000 -RCC.VcooutputI2S=192000000 -SH.GPXTI0.0=GPIO_EXTI0 -SH.GPXTI0.ConfNb=1 -SH.GPXTI1.0=GPIO_EXTI1 -SH.GPXTI1.ConfNb=1 -SH.GPXTI10.0=GPIO_EXTI10 -SH.GPXTI10.ConfNb=1 -SH.GPXTI11.0=GPIO_EXTI11 -SH.GPXTI11.ConfNb=1 -SH.GPXTI12.0=GPIO_EXTI12 -SH.GPXTI12.ConfNb=1 -SH.GPXTI13.0=GPIO_EXTI13 -SH.GPXTI13.ConfNb=1 -SH.GPXTI14.0=GPIO_EXTI14 -SH.GPXTI14.ConfNb=1 -SH.GPXTI2.0=GPIO_EXTI2 -SH.GPXTI2.ConfNb=1 -SH.GPXTI3.0=GPIO_EXTI3 -SH.GPXTI3.ConfNb=1 -SH.GPXTI5.0=GPIO_EXTI5 -SH.GPXTI5.ConfNb=1 -SH.GPXTI6.0=GPIO_EXTI6 -SH.GPXTI6.ConfNb=1 -SH.GPXTI7.0=GPIO_EXTI7 -SH.GPXTI7.ConfNb=1 -USART3.IPParameters=VirtualMode -USART3.VirtualMode=VM_ASYNC -VP_SYS_VS_Systick.Mode=SysTick -VP_SYS_VS_Systick.Signal=SYS_VS_Systick -board=custom +#MicroXplorer Configuration settings - do not modify +CAD.formats= +CAD.pinconfig= +CAD.provider= +CAN1.BS1=CAN_BS1_11TQ +CAN1.BS2=CAN_BS2_2TQ +CAN1.CalculateBaudRate=500000 +CAN1.CalculateTimeBit=2000 +CAN1.CalculateTimeQuantum=142.85714285714286 +CAN1.IPParameters=CalculateTimeQuantum,CalculateTimeBit,CalculateBaudRate,BS1,Prescaler,BS2 +CAN1.Prescaler=6 +File.Version=6 +GPIO.groupedBy=Group By Peripherals +KeepUserPlacement=false +Mcu.CPN=STM32F405RGT6V +Mcu.Family=STM32F4 +Mcu.IP0=CAN1 +Mcu.IP1=NVIC +Mcu.IP2=RCC +Mcu.IP3=SYS +Mcu.IP4=USART3 +Mcu.IPNb=5 +Mcu.Name=STM32F405RGTx +Mcu.Package=LQFP64 +Mcu.Pin0=PH0-OSC_IN +Mcu.Pin1=PH1-OSC_OUT +Mcu.Pin10=PB14 +Mcu.Pin11=PC8 +Mcu.Pin12=PC9 +Mcu.Pin13=PA13 +Mcu.Pin14=PA14 +Mcu.Pin15=PA15 +Mcu.Pin16=PC10 +Mcu.Pin17=PC11 +Mcu.Pin18=PB3 +Mcu.Pin19=PB5 +Mcu.Pin2=PA2 +Mcu.Pin20=PB6 +Mcu.Pin21=PB7 +Mcu.Pin22=PB8 +Mcu.Pin23=PB9 +Mcu.Pin24=VP_SYS_VS_Systick +Mcu.Pin3=PA3 +Mcu.Pin4=PB0 +Mcu.Pin5=PB1 +Mcu.Pin6=PB10 +Mcu.Pin7=PB11 +Mcu.Pin8=PB12 +Mcu.Pin9=PB13 +Mcu.PinsNb=25 +Mcu.ThirdPartyNb=0 +Mcu.UserConstants= +Mcu.UserName=STM32F405RGTx +MxCube.Version=6.13.0 +MxDb.Version=DB.6.0.130 +NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.EXTI0_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true +NVIC.EXTI15_10_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true +NVIC.EXTI1_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true +NVIC.EXTI2_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true +NVIC.EXTI3_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true +NVIC.EXTI9_5_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true +NVIC.ForceEnableDMAVector=true +NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 +NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:false +NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +PA13.Mode=JTAG_4_pins +PA13.Signal=SYS_JTMS-SWDIO +PA14.Mode=JTAG_4_pins +PA14.Signal=SYS_JTCK-SWCLK +PA15.Mode=JTAG_4_pins +PA15.Signal=SYS_JTDI +PA2.GPIOParameters=GPIO_Label +PA2.GPIO_Label=Button_1 +PA2.Locked=true +PA2.Signal=GPXTI2 +PA3.GPIOParameters=GPIO_Label +PA3.GPIO_Label=Button_4 +PA3.Locked=true +PA3.Signal=GPXTI3 +PB0.GPIOParameters=GPIO_Label +PB0.GPIO_Label=Button_6 +PB0.Locked=true +PB0.Signal=GPXTI0 +PB1.GPIOParameters=GPIO_Label +PB1.GPIO_Label=Button_5 +PB1.Locked=true +PB1.Signal=GPXTI1 +PB10.GPIOParameters=GPIO_Label +PB10.GPIO_Label=Button_2 +PB10.Locked=true +PB10.Signal=GPXTI10 +PB11.GPIOParameters=GPIO_Label +PB11.GPIO_Label=Button_3 +PB11.Locked=true +PB11.Signal=GPXTI11 +PB12.GPIOParameters=GPIO_Label +PB12.GPIO_Label=Button_Spare +PB12.Locked=true +PB12.Signal=GPXTI12 +PB13.GPIOParameters=GPIO_Label +PB13.GPIO_Label=Switch_4 +PB13.Locked=true +PB13.Signal=GPXTI13 +PB14.GPIOParameters=GPIO_Label +PB14.GPIO_Label=Switch_5 +PB14.Locked=true +PB14.Signal=GPXTI14 +PB3.Mode=JTAG_4_pins +PB3.Signal=SYS_JTDO-SWO +PB5.GPIOParameters=GPIO_Label +PB5.GPIO_Label=Switch_1 +PB5.Locked=true +PB5.Signal=GPXTI5 +PB6.GPIOParameters=GPIO_Label +PB6.GPIO_Label=Switch_2 +PB6.Locked=true +PB6.Signal=GPXTI6 +PB7.GPIOParameters=GPIO_Label +PB7.GPIO_Label=Switch_3 +PB7.Locked=true +PB7.Signal=GPXTI7 +PB8.Locked=true +PB8.Mode=CAN_Activate +PB8.Signal=CAN1_RX +PB9.Locked=true +PB9.Mode=CAN_Activate +PB9.Signal=CAN1_TX +PC10.Locked=true +PC10.Mode=Asynchronous +PC10.Signal=USART3_TX +PC11.Locked=true +PC11.Mode=Asynchronous +PC11.Signal=USART3_RX +PC8.GPIOParameters=GPIO_Label +PC8.GPIO_Label=Debug_LED_1 +PC8.Locked=true +PC8.Signal=GPIO_Output +PC9.GPIOParameters=GPIO_Label +PC9.GPIO_Label=Debug_LED_2 +PC9.Locked=true +PC9.Signal=GPIO_Output +PH0-OSC_IN.Mode=HSE-External-Clock-Source +PH0-OSC_IN.Signal=RCC_OSC_IN +PH1-OSC_OUT.Mode=HSE-External-Clock-Source +PH1-OSC_OUT.Signal=RCC_OSC_OUT +PinOutPanel.RotationAngle=0 +ProjectManager.AskForMigrate=true +ProjectManager.BackupPrevious=false +ProjectManager.CompilerOptimize=6 +ProjectManager.ComputerToolchain=false +ProjectManager.CoupleFile=false +ProjectManager.CustomerFirmwarePackage= +ProjectManager.DefaultFWLocation=true +ProjectManager.DeletePrevious=true +ProjectManager.DeviceId=STM32F405RGTx +ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.28.1 +ProjectManager.FreePins=false +ProjectManager.HalAssertFull=false +ProjectManager.HeapSize=0x200 +ProjectManager.KeepUserCode=true +ProjectManager.LastFirmware=true +ProjectManager.LibraryCopy=1 +ProjectManager.MainLocation=Core/Src +ProjectManager.NoMain=false +ProjectManager.PreviousToolchain= +ProjectManager.ProjectBuild=false +ProjectManager.ProjectFileName=Polyphemus.ioc +ProjectManager.ProjectName=Polyphemus +ProjectManager.ProjectStructure= +ProjectManager.RegisterCallBack= +ProjectManager.StackSize=0x400 +ProjectManager.TargetToolchain=Makefile +ProjectManager.ToolChainLocation= +ProjectManager.UAScriptAfterPath= +ProjectManager.UAScriptBeforePath= +ProjectManager.UnderRoot=false +ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_CAN1_Init-CAN1-false-HAL-true,4-MX_USART3_UART_Init-USART3-false-HAL-true +RCC.48MHZClocksFreq_Value=42000000 +RCC.AHBFreq_Value=84000000 +RCC.APB1CLKDivider=RCC_HCLK_DIV2 +RCC.APB1Freq_Value=42000000 +RCC.APB1TimFreq_Value=84000000 +RCC.APB2CLKDivider=RCC_HCLK_DIV4 +RCC.APB2Freq_Value=21000000 +RCC.APB2TimFreq_Value=42000000 +RCC.CortexFreq_Value=84000000 +RCC.EthernetFreq_Value=84000000 +RCC.FCLKCortexFreq_Value=84000000 +RCC.FamilyName=M +RCC.HCLKFreq_Value=84000000 +RCC.HSE_VALUE=8000000 +RCC.HSI_VALUE=16000000 +RCC.I2SClocksFreq_Value=192000000 +RCC.IPParameters=48MHZClocksFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2CLKDivider,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,EthernetFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2SClocksFreq_Value,LSE_VALUE,LSI_VALUE,MCO2PinFreq_Value,PLLCLKFreq_Value,PLLM,PLLMCOFreq_Value,PLLN,PLLQCLKFreq_Value,PLLSourceVirtual,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VcooutputI2S +RCC.LSE_VALUE=32768 +RCC.LSI_VALUE=32000 +RCC.MCO2PinFreq_Value=84000000 +RCC.PLLCLKFreq_Value=84000000 +RCC.PLLM=4 +RCC.PLLMCOFreq_Value=4000000 +RCC.PLLN=84 +RCC.PLLQCLKFreq_Value=42000000 +RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE +RCC.RTCFreq_Value=32000 +RCC.RTCHSEDivFreq_Value=4000000 +RCC.SYSCLKFreq_VALUE=84000000 +RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK +RCC.TimSysFreq_Value=8000000 +RCC.VCOI2SOutputFreq_Value=384000000 +RCC.VCOInputFreq_Value=2000000 +RCC.VCOOutputFreq_Value=168000000 +RCC.VcooutputI2S=192000000 +SH.GPXTI0.0=GPIO_EXTI0 +SH.GPXTI0.ConfNb=1 +SH.GPXTI1.0=GPIO_EXTI1 +SH.GPXTI1.ConfNb=1 +SH.GPXTI10.0=GPIO_EXTI10 +SH.GPXTI10.ConfNb=1 +SH.GPXTI11.0=GPIO_EXTI11 +SH.GPXTI11.ConfNb=1 +SH.GPXTI12.0=GPIO_EXTI12 +SH.GPXTI12.ConfNb=1 +SH.GPXTI13.0=GPIO_EXTI13 +SH.GPXTI13.ConfNb=1 +SH.GPXTI14.0=GPIO_EXTI14 +SH.GPXTI14.ConfNb=1 +SH.GPXTI2.0=GPIO_EXTI2 +SH.GPXTI2.ConfNb=1 +SH.GPXTI3.0=GPIO_EXTI3 +SH.GPXTI3.ConfNb=1 +SH.GPXTI5.0=GPIO_EXTI5 +SH.GPXTI5.ConfNb=1 +SH.GPXTI6.0=GPIO_EXTI6 +SH.GPXTI6.ConfNb=1 +SH.GPXTI7.0=GPIO_EXTI7 +SH.GPXTI7.ConfNb=1 +USART3.IPParameters=VirtualMode +USART3.VirtualMode=VM_ASYNC +VP_SYS_VS_Systick.Mode=SysTick +VP_SYS_VS_Systick.Signal=SYS_VS_Systick +board=custom From 2475e2a0133d53aeac2ec10de8820af3103086d8 Mon Sep 17 00:00:00 2001 From: Caio Date: Sat, 19 Apr 2025 01:01:26 -0400 Subject: [PATCH 2/5] final wheel change --- Core/Inc/main.h | 22 +++++++++++----------- Core/Src/main.c | 12 ++++++------ Core/Src/stm32f4xx_it.c | 8 ++++---- Polyphemus.ioc | 8 ++++---- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Core/Inc/main.h b/Core/Inc/main.h index cbd2fd5..90d0d14 100644 --- a/Core/Inc/main.h +++ b/Core/Inc/main.h @@ -60,24 +60,24 @@ void Error_Handler(void); #define Button_1_Pin GPIO_PIN_2 #define Button_1_GPIO_Port GPIOA #define Button_1_EXTI_IRQn EXTI2_IRQn -#define Button_4_Pin GPIO_PIN_3 -#define Button_4_GPIO_Port GPIOA -#define Button_4_EXTI_IRQn EXTI3_IRQn -#define Button_6_Pin GPIO_PIN_0 -#define Button_6_GPIO_Port GPIOB -#define Button_6_EXTI_IRQn EXTI0_IRQn -#define Button_5_Pin GPIO_PIN_1 +#define Button_Spare_Pin GPIO_PIN_3 +#define Button_Spare_GPIO_Port GPIOA +#define Button_Spare_EXTI_IRQn EXTI3_IRQn +#define Button_5_Pin GPIO_PIN_0 #define Button_5_GPIO_Port GPIOB -#define Button_5_EXTI_IRQn EXTI1_IRQn +#define Button_5_EXTI_IRQn EXTI0_IRQn +#define Button_4_Pin GPIO_PIN_1 +#define Button_4_GPIO_Port GPIOB +#define Button_4_EXTI_IRQn EXTI1_IRQn #define Button_2_Pin GPIO_PIN_10 #define Button_2_GPIO_Port GPIOB #define Button_2_EXTI_IRQn EXTI15_10_IRQn #define Button_3_Pin GPIO_PIN_11 #define Button_3_GPIO_Port GPIOB #define Button_3_EXTI_IRQn EXTI15_10_IRQn -#define Button_Spare_Pin GPIO_PIN_12 -#define Button_Spare_GPIO_Port GPIOB -#define Button_Spare_EXTI_IRQn EXTI15_10_IRQn +#define Button_6_Pin GPIO_PIN_12 +#define Button_6_GPIO_Port GPIOB +#define Button_6_EXTI_IRQn EXTI15_10_IRQn #define Switch_4_Pin GPIO_PIN_13 #define Switch_4_GPIO_Port GPIOB #define Switch_4_EXTI_IRQn EXTI15_10_IRQn diff --git a/Core/Src/main.c b/Core/Src/main.c index 9c548d8..0e915dc 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -279,17 +279,17 @@ static void MX_GPIO_Init(void) /*Configure GPIO pin Output Level */ HAL_GPIO_WritePin(GPIOC, Debug_LED_1_Pin|Debug_LED_2_Pin, GPIO_PIN_RESET); - /*Configure GPIO pins : Button_1_Pin Button_4_Pin */ - GPIO_InitStruct.Pin = Button_1_Pin|Button_4_Pin; + /*Configure GPIO pins : Button_1_Pin Button_Spare_Pin */ + GPIO_InitStruct.Pin = Button_1_Pin|Button_Spare_Pin; GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - /*Configure GPIO pins : Button_6_Pin Button_5_Pin Button_2_Pin Button_3_Pin - Button_Spare_Pin Switch_4_Pin Switch_5_Pin Switch_1_Pin + /*Configure GPIO pins : Button_5_Pin Button_4_Pin Button_2_Pin Button_3_Pin + Button_6_Pin Switch_4_Pin Switch_5_Pin Switch_1_Pin Switch_2_Pin Switch_3_Pin */ - GPIO_InitStruct.Pin = Button_6_Pin|Button_5_Pin|Button_2_Pin|Button_3_Pin - |Button_Spare_Pin|Switch_4_Pin|Switch_5_Pin|Switch_1_Pin + GPIO_InitStruct.Pin = Button_5_Pin|Button_4_Pin|Button_2_Pin|Button_3_Pin + |Button_6_Pin|Switch_4_Pin|Switch_5_Pin|Switch_1_Pin |Switch_2_Pin|Switch_3_Pin; GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; GPIO_InitStruct.Pull = GPIO_NOPULL; diff --git a/Core/Src/stm32f4xx_it.c b/Core/Src/stm32f4xx_it.c index c39580d..ad705b3 100644 --- a/Core/Src/stm32f4xx_it.c +++ b/Core/Src/stm32f4xx_it.c @@ -206,7 +206,7 @@ void EXTI0_IRQHandler(void) /* USER CODE BEGIN EXTI0_IRQn 0 */ /* USER CODE END EXTI0_IRQn 0 */ - HAL_GPIO_EXTI_IRQHandler(Button_6_Pin); + HAL_GPIO_EXTI_IRQHandler(Button_5_Pin); /* USER CODE BEGIN EXTI0_IRQn 1 */ /* USER CODE END EXTI0_IRQn 1 */ @@ -220,7 +220,7 @@ void EXTI1_IRQHandler(void) /* USER CODE BEGIN EXTI1_IRQn 0 */ /* USER CODE END EXTI1_IRQn 0 */ - HAL_GPIO_EXTI_IRQHandler(Button_5_Pin); + HAL_GPIO_EXTI_IRQHandler(Button_4_Pin); /* USER CODE BEGIN EXTI1_IRQn 1 */ /* USER CODE END EXTI1_IRQn 1 */ @@ -248,7 +248,7 @@ void EXTI3_IRQHandler(void) /* USER CODE BEGIN EXTI3_IRQn 0 */ /* USER CODE END EXTI3_IRQn 0 */ - HAL_GPIO_EXTI_IRQHandler(Button_4_Pin); + HAL_GPIO_EXTI_IRQHandler(Button_Spare_Pin); /* USER CODE BEGIN EXTI3_IRQn 1 */ /* USER CODE END EXTI3_IRQn 1 */ @@ -280,7 +280,7 @@ void EXTI15_10_IRQHandler(void) /* USER CODE END EXTI15_10_IRQn 0 */ HAL_GPIO_EXTI_IRQHandler(Button_2_Pin); HAL_GPIO_EXTI_IRQHandler(Button_3_Pin); - HAL_GPIO_EXTI_IRQHandler(Button_Spare_Pin); + HAL_GPIO_EXTI_IRQHandler(Button_6_Pin); HAL_GPIO_EXTI_IRQHandler(Switch_4_Pin); HAL_GPIO_EXTI_IRQHandler(Switch_5_Pin); /* USER CODE BEGIN EXTI15_10_IRQn 1 */ diff --git a/Polyphemus.ioc b/Polyphemus.ioc index 39b0870..5fd32fa 100644 --- a/Polyphemus.ioc +++ b/Polyphemus.ioc @@ -81,15 +81,15 @@ PA2.GPIO_Label=Button_1 PA2.Locked=true PA2.Signal=GPXTI2 PA3.GPIOParameters=GPIO_Label -PA3.GPIO_Label=Button_4 +PA3.GPIO_Label=Button_Spare PA3.Locked=true PA3.Signal=GPXTI3 PB0.GPIOParameters=GPIO_Label -PB0.GPIO_Label=Button_6 +PB0.GPIO_Label=Button_5 PB0.Locked=true PB0.Signal=GPXTI0 PB1.GPIOParameters=GPIO_Label -PB1.GPIO_Label=Button_5 +PB1.GPIO_Label=Button_4 PB1.Locked=true PB1.Signal=GPXTI1 PB10.GPIOParameters=GPIO_Label @@ -101,7 +101,7 @@ PB11.GPIO_Label=Button_3 PB11.Locked=true PB11.Signal=GPXTI11 PB12.GPIOParameters=GPIO_Label -PB12.GPIO_Label=Button_Spare +PB12.GPIO_Label=Button_6 PB12.Locked=true PB12.Signal=GPXTI12 PB13.GPIOParameters=GPIO_Label From a0a7d085d89ac20f09498c355b6d362a3609ca93 Mon Sep 17 00:00:00 2001 From: Caio Date: Fri, 23 May 2025 13:33:22 -0400 Subject: [PATCH 3/5] changed to falling edge interrupt --- Core/Src/main.c | 16 +++++++++++----- Polyphemus.ioc | 23 +++++++++++++++-------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/Core/Src/main.c b/Core/Src/main.c index 0e915dc..553e4d3 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -281,16 +281,22 @@ static void MX_GPIO_Init(void) /*Configure GPIO pins : Button_1_Pin Button_Spare_Pin */ GPIO_InitStruct.Pin = Button_1_Pin|Button_Spare_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; + GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); /*Configure GPIO pins : Button_5_Pin Button_4_Pin Button_2_Pin Button_3_Pin - Button_6_Pin Switch_4_Pin Switch_5_Pin Switch_1_Pin - Switch_2_Pin Switch_3_Pin */ + Button_6_Pin */ GPIO_InitStruct.Pin = Button_5_Pin|Button_4_Pin|Button_2_Pin|Button_3_Pin - |Button_6_Pin|Switch_4_Pin|Switch_5_Pin|Switch_1_Pin - |Switch_2_Pin|Switch_3_Pin; + |Button_6_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + /*Configure GPIO pins : Switch_4_Pin Switch_5_Pin Switch_1_Pin Switch_2_Pin + Switch_3_Pin */ + GPIO_InitStruct.Pin = Switch_4_Pin|Switch_5_Pin|Switch_1_Pin|Switch_2_Pin + |Switch_3_Pin; GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); diff --git a/Polyphemus.ioc b/Polyphemus.ioc index 5fd32fa..61e6e41 100644 --- a/Polyphemus.ioc +++ b/Polyphemus.ioc @@ -76,32 +76,39 @@ PA14.Mode=JTAG_4_pins PA14.Signal=SYS_JTCK-SWCLK PA15.Mode=JTAG_4_pins PA15.Signal=SYS_JTDI -PA2.GPIOParameters=GPIO_Label +PA2.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI PA2.GPIO_Label=Button_1 +PA2.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_FALLING PA2.Locked=true PA2.Signal=GPXTI2 -PA3.GPIOParameters=GPIO_Label +PA3.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI PA3.GPIO_Label=Button_Spare +PA3.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_FALLING PA3.Locked=true PA3.Signal=GPXTI3 -PB0.GPIOParameters=GPIO_Label +PB0.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI PB0.GPIO_Label=Button_5 +PB0.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_FALLING PB0.Locked=true PB0.Signal=GPXTI0 -PB1.GPIOParameters=GPIO_Label +PB1.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI PB1.GPIO_Label=Button_4 +PB1.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_FALLING PB1.Locked=true PB1.Signal=GPXTI1 -PB10.GPIOParameters=GPIO_Label +PB10.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI PB10.GPIO_Label=Button_2 +PB10.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_FALLING PB10.Locked=true PB10.Signal=GPXTI10 -PB11.GPIOParameters=GPIO_Label +PB11.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI PB11.GPIO_Label=Button_3 +PB11.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_FALLING PB11.Locked=true PB11.Signal=GPXTI11 -PB12.GPIOParameters=GPIO_Label +PB12.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI PB12.GPIO_Label=Button_6 +PB12.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_FALLING PB12.Locked=true PB12.Signal=GPXTI12 PB13.GPIOParameters=GPIO_Label @@ -165,7 +172,7 @@ ProjectManager.FreePins=false ProjectManager.HalAssertFull=false ProjectManager.HeapSize=0x200 ProjectManager.KeepUserCode=true -ProjectManager.LastFirmware=true +ProjectManager.LastFirmware=false ProjectManager.LibraryCopy=1 ProjectManager.MainLocation=Core/Src ProjectManager.NoMain=false From f9587739af80cc245e3da8b31aae95f2e9382d7b Mon Sep 17 00:00:00 2001 From: Caio Date: Fri, 23 May 2025 13:42:10 -0400 Subject: [PATCH 4/5] revert --- Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c b/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c index 6ea69fa..0164470 100644 --- a/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c +++ b/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c @@ -330,6 +330,7 @@ HAL_StatusTypeDef HAL_CAN_Init(CAN_HandleTypeDef *hcan) HAL_CAN_MspInit(hcan); } #endif /* USE_HAL_CAN_REGISTER_CALLBACKS */ + CLEAR_BIT(hcan->Instance->MCR, CAN_MCR_SLEEP); /* Request initialisation */ SET_BIT(hcan->Instance->MCR, CAN_MCR_INRQ); From 1ccfb8c2ea9f6a2534f1b234f22997e732be304c Mon Sep 17 00:00:00 2001 From: Caio Date: Fri, 6 Jun 2025 20:54:39 -0400 Subject: [PATCH 5/5] create heart beat --- Core/Src/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Core/Src/main.c b/Core/Src/main.c index 553e4d3..995ab05 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -133,10 +133,16 @@ int main(void) /* USER CODE BEGIN WHILE */ while (1) { - if(flag) { + if (flag) { flag = 0; determine_action(gpio_pin); } + + uint32_t tick = HAL_GetTick(); + if (tick % 500 == 0) { + printf(".\n", tick); + } + /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */