diff --git a/Software/.cproject b/Software/.cproject
new file mode 100644
index 0000000..3f6c20c
--- /dev/null
+++ b/Software/.cproject
@@ -0,0 +1,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Software/.gitignore b/Software/.gitignore
new file mode 100644
index 0000000..dbc7417
--- /dev/null
+++ b/Software/.gitignore
@@ -0,0 +1,5 @@
+build
+
+*.o
+
+.settings
\ No newline at end of file
diff --git a/Software/.mxproject b/Software/.mxproject
new file mode 100644
index 0000000..1041933
--- /dev/null
+++ b/Software/.mxproject
@@ -0,0 +1,25 @@
+[PreviousGenFiles]
+AdvancedFolderStructure=true
+HeaderFileListSize=3
+HeaderFiles#0=..\Core\Inc\stm32f3xx_it.h
+HeaderFiles#1=..\Core\Inc\stm32f3xx_hal_conf.h
+HeaderFiles#2=..\Core\Inc\main.h
+HeaderFolderListSize=1
+HeaderPath#0=..\Core\Inc
+HeaderFiles=;
+SourceFileListSize=3
+SourceFiles#0=..\Core\Src\stm32f3xx_it.c
+SourceFiles#1=..\Core\Src\stm32f3xx_hal_msp.c
+SourceFiles#2=..\Core\Src\main.c
+SourceFolderListSize=1
+SourcePath#0=..\Core\Src
+SourceFiles=;
+
+[PreviousLibFiles]
+LibFiles=Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_can.h;Drivers\STM32F3xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_def.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_rcc.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_rcc_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_bus.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_rcc.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_crs.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_system.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_utils.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_gpio.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_gpio_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_gpio.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_dma_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_dma.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_dma.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_cortex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_cortex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_pwr.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_pwr_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_pwr.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_flash.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_flash_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_i2c.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_i2c_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_exti.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_exti.h;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_can.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_gpio.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_dma.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_cortex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_exti.c;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_can.h;Drivers\STM32F3xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_def.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_rcc.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_rcc_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_bus.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_rcc.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_crs.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_system.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_utils.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_gpio.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_gpio_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_gpio.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_dma_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_dma.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_dma.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_cortex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_cortex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_pwr.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_pwr_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_pwr.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_flash.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_flash_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_i2c.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_i2c_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_exti.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_exti.h;Drivers\CMSIS\Device\ST\STM32F3xx\Include\stm32f302xc.h;Drivers\CMSIS\Device\ST\STM32F3xx\Include\stm32f3xx.h;Drivers\CMSIS\Device\ST\STM32F3xx\Include\system_stm32f3xx.h;Drivers\CMSIS\Device\ST\STM32F3xx\Include\system_stm32f3xx.h;Drivers\CMSIS\Device\ST\STM32F3xx\Source\Templates\system_stm32f3xx.c;Drivers\CMSIS\Include\cmsis_armcc.h;Drivers\CMSIS\Include\cmsis_armclang.h;Drivers\CMSIS\Include\cmsis_compiler.h;Drivers\CMSIS\Include\cmsis_gcc.h;Drivers\CMSIS\Include\cmsis_iccarm.h;Drivers\CMSIS\Include\cmsis_version.h;Drivers\CMSIS\Include\core_armv8mbl.h;Drivers\CMSIS\Include\core_armv8mml.h;Drivers\CMSIS\Include\core_cm0.h;Drivers\CMSIS\Include\core_cm0plus.h;Drivers\CMSIS\Include\core_cm1.h;Drivers\CMSIS\Include\core_cm23.h;Drivers\CMSIS\Include\core_cm3.h;Drivers\CMSIS\Include\core_cm33.h;Drivers\CMSIS\Include\core_cm4.h;Drivers\CMSIS\Include\core_cm7.h;Drivers\CMSIS\Include\core_sc000.h;Drivers\CMSIS\Include\core_sc300.h;Drivers\CMSIS\Include\mpu_armv7.h;Drivers\CMSIS\Include\mpu_armv8.h;Drivers\CMSIS\Include\tz_context.h;
+
+[PreviousUsedCubeIDEFiles]
+SourceFiles=Core\Src\main.c;Core\Src\stm32f3xx_it.c;Core\Src\stm32f3xx_hal_msp.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_can.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_gpio.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_dma.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_cortex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_exti.c;Drivers\CMSIS\Device\ST\STM32F3xx\Source\Templates\system_stm32f3xx.c;Core\Src\system_stm32f3xx.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_can.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_gpio.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_dma.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_cortex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_exti.c;Drivers\CMSIS\Device\ST\STM32F3xx\Source\Templates\system_stm32f3xx.c;Core\Src\system_stm32f3xx.c;;;
+HeaderPath=Drivers\STM32F3xx_HAL_Driver\Inc;Drivers\STM32F3xx_HAL_Driver\Inc\Legacy;Drivers\CMSIS\Device\ST\STM32F3xx\Include;Drivers\CMSIS\Include;Core\Inc;
+CDefines=USE_HAL_DRIVER;STM32F302xC;USE_HAL_DRIVER;USE_HAL_DRIVER;
+
diff --git a/Software/.project b/Software/.project
new file mode 100644
index 0000000..ee149b4
--- /dev/null
+++ b/Software/.project
@@ -0,0 +1,32 @@
+
+
+ Dashboard
+
+
+
+
+
+ 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/Software/Core/Inc/main.h b/Software/Core/Inc/main.h
new file mode 100644
index 0000000..75b7499
--- /dev/null
+++ b/Software/Core/Inc/main.h
@@ -0,0 +1,97 @@
+/* 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) 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.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __MAIN_H
+#define __MAIN_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "stm32f3xx_hal.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 -----------------------------------------------------------*/
+#define TSON_R_Pin GPIO_PIN_0
+#define TSON_R_GPIO_Port GPIOA
+#define TSON_G_Pin GPIO_PIN_1
+#define TSON_G_GPIO_Port GPIOA
+#define TSON_B_Pin GPIO_PIN_2
+#define TSON_B_GPIO_Port GPIOA
+#define IMD_LED_Pin GPIO_PIN_3
+#define IMD_LED_GPIO_Port GPIOA
+#define AMS_LED_Pin GPIO_PIN_4
+#define AMS_LED_GPIO_Port GPIOA
+#define TSOFF_LED_Pin GPIO_PIN_5
+#define TSOFF_LED_GPIO_Port GPIOA
+#define R2D_R_Pin GPIO_PIN_7
+#define R2D_R_GPIO_Port GPIOA
+#define R2D_G_Pin GPIO_PIN_0
+#define R2D_G_GPIO_Port GPIOB
+#define R2D_B_Pin GPIO_PIN_1
+#define R2D_B_GPIO_Port GPIOB
+#define TSON_BTN_Pin GPIO_PIN_15
+#define TSON_BTN_GPIO_Port GPIOB
+#define SDC_Out_3V3_Pin GPIO_PIN_3
+#define SDC_Out_3V3_GPIO_Port GPIOB
+#define SDC_In_3V3_Pin GPIO_PIN_4
+#define SDC_In_3V3_GPIO_Port GPIOB
+#define R2D_BTN_Pin GPIO_PIN_5
+#define R2D_BTN_GPIO_Port GPIOB
+#define RMode_Out_3V3_Pin GPIO_PIN_8
+#define RMode_Out_3V3_GPIO_Port GPIOB
+
+/* USER CODE BEGIN Private defines */
+
+/* USER CODE END Private defines */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MAIN_H */
diff --git a/Software/Core/Inc/stm32f3xx_hal_conf.h b/Software/Core/Inc/stm32f3xx_hal_conf.h
new file mode 100644
index 0000000..1787953
--- /dev/null
+++ b/Software/Core/Inc/stm32f3xx_hal_conf.h
@@ -0,0 +1,360 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file stm32f3xx_hal_conf.h
+ * @brief HAL configuration file.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2016 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 __STM32F3xx_HAL_CONF_H
+#define __STM32F3xx_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_CAN_MODULE_ENABLED
+/*#define HAL_CEC_MODULE_ENABLED */
+/*#define HAL_NAND_MODULE_ENABLED */
+/*#define HAL_NOR_MODULE_ENABLED */
+/*#define HAL_PCCARD_MODULE_ENABLED */
+/*#define HAL_SRAM_MODULE_ENABLED */
+/*#define HAL_HRTIM_MODULE_ENABLED */
+/*#define HAL_OPAMP_MODULE_ENABLED */
+/*#define HAL_SDADC_MODULE_ENABLED */
+/*#define HAL_TSC_MODULE_ENABLED */
+/*#define HAL_COMP_MODULE_ENABLED */
+/*#define HAL_CRC_MODULE_ENABLED */
+/*#define HAL_CRYP_MODULE_ENABLED */
+/*#define HAL_DAC_MODULE_ENABLED */
+/*#define HAL_I2S_MODULE_ENABLED */
+/*#define HAL_IWDG_MODULE_ENABLED */
+/*#define HAL_LCD_MODULE_ENABLED */
+/*#define HAL_LPTIM_MODULE_ENABLED */
+/*#define HAL_RNG_MODULE_ENABLED */
+/*#define HAL_RTC_MODULE_ENABLED */
+/*#define HAL_SPI_MODULE_ENABLED */
+/*#define HAL_TIM_MODULE_ENABLED */
+/*#define HAL_UART_MODULE_ENABLED */
+/*#define HAL_USART_MODULE_ENABLED */
+/*#define HAL_IRDA_MODULE_ENABLED */
+/*#define HAL_SMARTCARD_MODULE_ENABLED */
+/*#define HAL_SMBUS_MODULE_ENABLED */
+/*#define HAL_WWDG_MODULE_ENABLED */
+/*#define HAL_PCD_MODULE_ENABLED */
+#define HAL_GPIO_MODULE_ENABLED
+#define HAL_EXTI_MODULE_ENABLED
+/* #define HAL_CAN_LEGACY_MODULE_ENABLED */
+#define HAL_DMA_MODULE_ENABLED
+#define HAL_RCC_MODULE_ENABLED
+#define HAL_FLASH_MODULE_ENABLED
+#define HAL_PWR_MODULE_ENABLED
+#define HAL_CORTEX_MODULE_ENABLED
+#define HAL_I2C_MODULE_ENABLED
+/* ########################## HSE/HSI 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 ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */
+#endif /* HSE_VALUE */
+
+/**
+ * @brief In the following line adjust the External High Speed oscillator (HSE) Startup
+ * Timeout 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 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 ((uint32_t)8000000) /*!< Value of the Internal oscillator in Hz*/
+#endif /* HSI_VALUE */
+
+/**
+ * @brief In the following line adjust the Internal High Speed oscillator (HSI) Startup
+ * Timeout value
+ */
+#if !defined (HSI_STARTUP_TIMEOUT)
+ #define HSI_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSI start up */
+#endif /* HSI_STARTUP_TIMEOUT */
+
+/**
+ * @brief Internal Low Speed oscillator (LSI) value.
+ */
+#if !defined (LSI_VALUE)
+ #define LSI_VALUE ((uint32_t)40000)
+#endif /* LSI_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.
+ */
+#if !defined (LSE_VALUE)
+ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */
+#endif /* LSE_VALUE */
+
+/**
+ * @brief Time out for LSE start up value in ms.
+ */
+#if !defined (LSE_STARTUP_TIMEOUT)
+ #define LSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for LSE start up, in ms */
+#endif /* LSE_STARTUP_TIMEOUT */
+
+/**
+ * @brief External clock source for I2S peripheral
+ * This value is used by the I2S HAL module to compute the I2S clock source
+ * frequency, this source is inserted directly through I2S_CKIN pad.
+ * - External clock generated through external PLL component on EVAL 303 (based on MCO or crystal)
+ * - External clock not generated on EVAL 373
+ */
+#if !defined (EXTERNAL_CLOCK_VALUE)
+ #define EXTERNAL_CLOCK_VALUE ((uint32_t)8000000) /*!< Value of the External oscillator in Hz*/
+#endif /* EXTERNAL_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 ((uint32_t)3300) /*!< Value of VDD in mv */
+#define TICK_INT_PRIORITY ((uint32_t)15) /*!< tick interrupt priority (lowest by default) */
+#define USE_RTOS 0
+#define PREFETCH_ENABLE 1
+#define INSTRUCTION_CACHE_ENABLE 0
+#define DATA_CACHE_ENABLE 0
+#define USE_SPI_CRC 0U
+
+#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */
+#define USE_HAL_CAN_REGISTER_CALLBACKS 1U /* CAN register callback enabled */
+#define USE_HAL_COMP_REGISTER_CALLBACKS 0U /* COMP register callback disabled */
+#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */
+#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */
+#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */
+#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */
+#define USE_HAL_SDADC_REGISTER_CALLBACKS 0U /* SDADC register callback disabled */
+#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */
+#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */
+#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */
+#define USE_HAL_HRTIM_REGISTER_CALLBACKS 0U /* HRTIM register callback disabled */
+#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */
+#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */
+#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */
+#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */
+#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */
+#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
+#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U /* OPAMP register callback disabled */
+#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */
+#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */
+#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */
+#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */
+#define USE_HAL_TSC_REGISTER_CALLBACKS 0U /* TSC register callback disabled */
+#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */
+
+/* ########################## Assert Selection ############################## */
+/**
+ * @brief Uncomment the line below to expanse the "assert_param" macro in the
+ * HAL drivers code
+ */
+/* #define USE_FULL_ASSERT 1U */
+
+/* Includes ------------------------------------------------------------------*/
+/**
+ * @brief Include module's header file
+ */
+
+#ifdef HAL_RCC_MODULE_ENABLED
+ #include "stm32f3xx_hal_rcc.h"
+#endif /* HAL_RCC_MODULE_ENABLED */
+
+#ifdef HAL_GPIO_MODULE_ENABLED
+ #include "stm32f3xx_hal_gpio.h"
+#endif /* HAL_GPIO_MODULE_ENABLED */
+
+#ifdef HAL_EXTI_MODULE_ENABLED
+ #include "stm32f3xx_hal_exti.h"
+#endif /* HAL_EXTI_MODULE_ENABLED */
+
+#ifdef HAL_DMA_MODULE_ENABLED
+ #include "stm32f3xx_hal_dma.h"
+#endif /* HAL_DMA_MODULE_ENABLED */
+
+#ifdef HAL_CORTEX_MODULE_ENABLED
+ #include "stm32f3xx_hal_cortex.h"
+#endif /* HAL_CORTEX_MODULE_ENABLED */
+
+#ifdef HAL_ADC_MODULE_ENABLED
+ #include "stm32f3xx_hal_adc.h"
+#endif /* HAL_ADC_MODULE_ENABLED */
+
+#ifdef HAL_CAN_MODULE_ENABLED
+ #include "stm32f3xx_hal_can.h"
+#endif /* HAL_CAN_MODULE_ENABLED */
+
+#ifdef HAL_CAN_LEGACY_MODULE_ENABLED
+ #include "stm32f3xx_hal_can_legacy.h"
+#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */
+
+#ifdef HAL_CEC_MODULE_ENABLED
+ #include "stm32f3xx_hal_cec.h"
+#endif /* HAL_CEC_MODULE_ENABLED */
+
+#ifdef HAL_COMP_MODULE_ENABLED
+ #include "stm32f3xx_hal_comp.h"
+#endif /* HAL_COMP_MODULE_ENABLED */
+
+#ifdef HAL_CRC_MODULE_ENABLED
+ #include "stm32f3xx_hal_crc.h"
+#endif /* HAL_CRC_MODULE_ENABLED */
+
+#ifdef HAL_DAC_MODULE_ENABLED
+ #include "stm32f3xx_hal_dac.h"
+#endif /* HAL_DAC_MODULE_ENABLED */
+
+#ifdef HAL_FLASH_MODULE_ENABLED
+ #include "stm32f3xx_hal_flash.h"
+#endif /* HAL_FLASH_MODULE_ENABLED */
+
+#ifdef HAL_SRAM_MODULE_ENABLED
+ #include "stm32f3xx_hal_sram.h"
+#endif /* HAL_SRAM_MODULE_ENABLED */
+
+#ifdef HAL_NOR_MODULE_ENABLED
+ #include "stm32f3xx_hal_nor.h"
+#endif /* HAL_NOR_MODULE_ENABLED */
+
+#ifdef HAL_NAND_MODULE_ENABLED
+ #include "stm32f3xx_hal_nand.h"
+#endif /* HAL_NAND_MODULE_ENABLED */
+
+#ifdef HAL_PCCARD_MODULE_ENABLED
+ #include "stm32f3xx_hal_pccard.h"
+#endif /* HAL_PCCARD_MODULE_ENABLED */
+
+#ifdef HAL_HRTIM_MODULE_ENABLED
+ #include "stm32f3xx_hal_hrtim.h"
+#endif /* HAL_HRTIM_MODULE_ENABLED */
+
+#ifdef HAL_I2C_MODULE_ENABLED
+ #include "stm32f3xx_hal_i2c.h"
+#endif /* HAL_I2C_MODULE_ENABLED */
+
+#ifdef HAL_I2S_MODULE_ENABLED
+ #include "stm32f3xx_hal_i2s.h"
+#endif /* HAL_I2S_MODULE_ENABLED */
+
+#ifdef HAL_IRDA_MODULE_ENABLED
+ #include "stm32f3xx_hal_irda.h"
+#endif /* HAL_IRDA_MODULE_ENABLED */
+
+#ifdef HAL_IWDG_MODULE_ENABLED
+ #include "stm32f3xx_hal_iwdg.h"
+#endif /* HAL_IWDG_MODULE_ENABLED */
+
+#ifdef HAL_OPAMP_MODULE_ENABLED
+ #include "stm32f3xx_hal_opamp.h"
+#endif /* HAL_OPAMP_MODULE_ENABLED */
+
+#ifdef HAL_PCD_MODULE_ENABLED
+ #include "stm32f3xx_hal_pcd.h"
+#endif /* HAL_PCD_MODULE_ENABLED */
+
+#ifdef HAL_PWR_MODULE_ENABLED
+ #include "stm32f3xx_hal_pwr.h"
+#endif /* HAL_PWR_MODULE_ENABLED */
+
+#ifdef HAL_RTC_MODULE_ENABLED
+ #include "stm32f3xx_hal_rtc.h"
+#endif /* HAL_RTC_MODULE_ENABLED */
+
+#ifdef HAL_SDADC_MODULE_ENABLED
+ #include "stm32f3xx_hal_sdadc.h"
+#endif /* HAL_SDADC_MODULE_ENABLED */
+
+#ifdef HAL_SMARTCARD_MODULE_ENABLED
+ #include "stm32f3xx_hal_smartcard.h"
+#endif /* HAL_SMARTCARD_MODULE_ENABLED */
+
+#ifdef HAL_SMBUS_MODULE_ENABLED
+ #include "stm32f3xx_hal_smbus.h"
+#endif /* HAL_SMBUS_MODULE_ENABLED */
+
+#ifdef HAL_SPI_MODULE_ENABLED
+ #include "stm32f3xx_hal_spi.h"
+#endif /* HAL_SPI_MODULE_ENABLED */
+
+#ifdef HAL_TIM_MODULE_ENABLED
+ #include "stm32f3xx_hal_tim.h"
+#endif /* HAL_TIM_MODULE_ENABLED */
+
+#ifdef HAL_TSC_MODULE_ENABLED
+ #include "stm32f3xx_hal_tsc.h"
+#endif /* HAL_TSC_MODULE_ENABLED */
+
+#ifdef HAL_UART_MODULE_ENABLED
+ #include "stm32f3xx_hal_uart.h"
+#endif /* HAL_UART_MODULE_ENABLED */
+
+#ifdef HAL_USART_MODULE_ENABLED
+ #include "stm32f3xx_hal_usart.h"
+#endif /* HAL_USART_MODULE_ENABLED */
+
+#ifdef HAL_WWDG_MODULE_ENABLED
+ #include "stm32f3xx_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 /* __STM32F3xx_HAL_CONF_H */
diff --git a/Software/Core/Inc/stm32f3xx_it.h b/Software/Core/Inc/stm32f3xx_it.h
new file mode 100644
index 0000000..23226ea
--- /dev/null
+++ b/Software/Core/Inc/stm32f3xx_it.h
@@ -0,0 +1,68 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file stm32f3xx_it.h
+ * @brief This file contains the headers of the interrupt handlers.
+ ******************************************************************************
+ * @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.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __STM32F3xx_IT_H
+#define __STM32F3xx_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 USB_LP_CAN_RX0_IRQHandler(void);
+void CAN_RX1_IRQHandler(void);
+/* USER CODE BEGIN EFP */
+
+/* USER CODE END EFP */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __STM32F3xx_IT_H */
diff --git a/Software/Core/Src/main.c b/Software/Core/Src/main.c
new file mode 100644
index 0000000..4a1f4ab
--- /dev/null
+++ b/Software/Core/Src/main.c
@@ -0,0 +1,477 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file : main.c
+ * @brief : Main program body
+ ******************************************************************************
+ * @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.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+/* Includes ------------------------------------------------------------------*/
+#include "main.h"
+
+/* Private includes ----------------------------------------------------------*/
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/* Private typedef -----------------------------------------------------------*/
+/* USER CODE BEGIN PTD */
+
+typedef struct {
+ int r2d : 1;
+ int tson : 1;
+ int racemode : 1;
+ int sdc_in : 1;
+ int sdc_out : 1;
+} dash_tx_t;
+
+typedef enum {
+ TS_INACTIVE = 0,
+ TS_ACTIVE = 1,
+ TS_PRECHARGE = 2,
+ TS_DISCHARGE = 3,
+ TS_ERROR = 4,
+} ams_state_t;
+
+typedef enum {
+ R2D_NONE = 0,
+ R2D_TSMS = 1,
+ R2D_TSActive = 2,
+ R2D_Resetting_Nodes = 3,
+ R2D_Resetting_Comms = 4,
+ R2D_Waiting_Init = 5,
+ R2D_Init_Stage1 = 6,
+ R2D_Init_Stage2 = 7,
+ R2D_Success = 0xF,
+} r2d_progress_t;
+
+typedef struct {
+ ams_state_t ams_state;
+ int imd_ok;
+ int sdc_closed;
+ r2d_progress_t r2d_progress;
+} dash_rx_t;
+
+/* USER CODE END PTD */
+
+/* Private define ------------------------------------------------------------*/
+/* USER CODE BEGIN PD */
+#define CAN_ID_TX 0x420
+#define CAN_ID_RX_R2D 0x410
+#define CAN_ID_RX_AMS 0x00A
+/* USER CODE END PD */
+
+/* Private macro -------------------------------------------------------------*/
+/* USER CODE BEGIN PM */
+
+/* USER CODE END PM */
+
+/* Private variables ---------------------------------------------------------*/
+CAN_HandleTypeDef hcan;
+
+/* USER CODE BEGIN PV */
+dash_tx_t dash_tx;
+CAN_TxHeaderTypeDef txHeader;
+uint32_t txMailbox;
+
+dash_rx_t dash_rx;
+
+uint32_t ams_last_tick = 0;
+uint32_t last_send_can_tick = 0;
+
+
+/* USER CODE END PV */
+
+/* Private function prototypes -----------------------------------------------*/
+void SystemClock_Config(void);
+static void MX_GPIO_Init(void);
+static void MX_CAN_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();
+
+ /* USER CODE BEGIN Init */
+
+ /* USER CODE END Init */
+
+ /* Configure the system clock */
+ SystemClock_Config();
+
+ /* USER CODE BEGIN SysInit */
+
+ /* USER CODE END SysInit */
+
+ /* Initialize all configured peripherals */
+ MX_GPIO_Init();
+ MX_CAN_Init();
+ /* USER CODE BEGIN 2 */
+
+ txHeader.IDE = CAN_ID_STD;
+ txHeader.StdId = CAN_ID_TX;
+ txHeader.RTR = CAN_RTR_DATA;
+ txHeader.DLC = 1;
+
+
+ if (HAL_CAN_Start(&hcan) != HAL_OK)
+ Error_Handler();
+
+ CAN_FilterTypeDef canfilterconfig;
+
+ canfilterconfig.FilterActivation = CAN_FILTER_ENABLE;
+ canfilterconfig.FilterBank = 0;
+ canfilterconfig.FilterFIFOAssignment = CAN_FILTER_FIFO0;
+ canfilterconfig.FilterIdHigh = CAN_ID_RX_AMS << (16 - 11);
+ canfilterconfig.FilterIdLow = CAN_ID_RX_R2D << (16 - 11);
+ canfilterconfig.FilterMaskIdHigh = 0x7FF << (16 - 11);
+ canfilterconfig.FilterMaskIdLow = 0x7FF << (16 - 11);
+ canfilterconfig.FilterMode = CAN_FILTERMODE_IDMASK;
+ canfilterconfig.FilterScale = CAN_FILTERSCALE_32BIT;
+ canfilterconfig.SlaveStartFilterBank = 14;
+
+ if (HAL_CAN_ConfigFilter(&hcan, &canfilterconfig) != HAL_OK) {
+ Error_Handler();
+ }
+
+ if (HAL_CAN_ActivateNotification(&hcan, CAN_IT_RX_FIFO0_MSG_PENDING) != HAL_OK)
+ Error_Handler();
+
+ // blink flags
+ int blink_state = 0;
+
+ /* USER CODE END 2 */
+
+ /* Infinite loop */
+ /* USER CODE BEGIN WHILE */
+ while (1)
+ {
+ /* USER CODE END WHILE */
+
+ /* USER CODE BEGIN 3 */
+ dash_tx.tson = HAL_GPIO_ReadPin(TSON_BTN_GPIO_Port, TSON_BTN_Pin);
+ dash_tx.r2d = HAL_GPIO_ReadPin(R2D_BTN_GPIO_Port, R2D_BTN_Pin);
+ dash_tx.sdc_in = HAL_GPIO_ReadPin(SDC_In_3V3_GPIO_Port, SDC_In_3V3_Pin);
+ dash_tx.sdc_out = HAL_GPIO_ReadPin(SDC_Out_3V3_GPIO_Port, SDC_Out_3V3_Pin);
+ dash_tx.racemode = HAL_GPIO_ReadPin(RMode_Out_3V3_GPIO_Port, RMode_Out_3V3_Pin);
+
+ if ((HAL_GetTick() - last_send_can_tick ) > 200) {
+ if (HAL_CAN_AddTxMessage(&hcan, &txHeader, (uint8_t*) &dash_tx, &txMailbox) != HAL_OK) {
+ Error_Handler();
+ }
+ last_send_can_tick = HAL_GetTick();
+ }
+
+ // Inverted in hardware
+ if ((HAL_GetTick() - ams_last_tick) < 80) {
+ HAL_GPIO_WritePin(IMD_LED_GPIO_Port, IMD_LED_Pin, dash_rx.imd_ok);
+ HAL_GPIO_WritePin(AMS_LED_GPIO_Port, AMS_LED_Pin, dash_rx.ams_state != TS_ERROR);
+ HAL_GPIO_WritePin(TSOFF_LED_GPIO_Port, TSOFF_LED_Pin, dash_rx.ams_state == TS_INACTIVE);
+ } else {
+ // Safe state: Error LEDs on, TSOFF off
+ HAL_GPIO_WritePin(IMD_LED_GPIO_Port, IMD_LED_Pin, 0);
+ HAL_GPIO_WritePin(AMS_LED_GPIO_Port, AMS_LED_Pin, 0);
+ HAL_GPIO_WritePin(TSOFF_LED_GPIO_Port, TSOFF_LED_Pin, 0);
+ }
+
+ int r = 0, g = 0, b = 0;
+ int br = 0, bg = 0, bb = 0;
+
+ if (dash_rx.sdc_closed) {
+ switch (dash_rx.ams_state) {
+ case TS_INACTIVE:
+ r = g = 1;
+ break;
+ case TS_PRECHARGE:
+ // Gelb blink
+ br = bg = 1;
+ break;
+ case TS_ACTIVE:
+ g = 1;
+ break;
+ case TS_DISCHARGE:
+ // Blau blink
+ bb = 1;
+ break;
+ default:
+ r = 1;
+ break;
+ }
+ } else {
+ b = 1;
+ }
+
+ HAL_GPIO_WritePin(TSON_R_GPIO_Port, TSON_R_Pin, r);
+ HAL_GPIO_WritePin(TSON_G_GPIO_Port, TSON_G_Pin, g);
+ HAL_GPIO_WritePin(TSON_B_GPIO_Port, TSON_B_Pin, b);
+
+ if (br || bg || bb) {
+ HAL_GPIO_WritePin(TSON_R_GPIO_Port, TSON_R_Pin, br && blink_state);
+ HAL_GPIO_WritePin(TSON_G_GPIO_Port, TSON_G_Pin, bg && blink_state);
+ HAL_GPIO_WritePin(TSON_B_GPIO_Port, TSON_B_Pin, bb && blink_state);
+ }
+
+ r = g = b = 0;
+ br = bg = bb = 0;
+
+ if (dash_rx.ams_state == TS_ACTIVE) {
+ switch (dash_rx.r2d_progress) {
+ case R2D_NONE:
+ case R2D_TSMS:
+ case R2D_TSActive:
+ r = g = 1;
+ break;
+ case R2D_Success:
+ g = 1;
+ break;
+ default:
+ // Gelb blink
+ bg = br = 1;
+ break;
+ }
+ } else {
+ b = 1;
+ }
+
+ HAL_GPIO_WritePin(R2D_R_GPIO_Port, R2D_R_Pin, r);
+ HAL_GPIO_WritePin(R2D_G_GPIO_Port, R2D_G_Pin, g);
+ HAL_GPIO_WritePin(R2D_B_GPIO_Port, R2D_B_Pin, b);
+
+
+ if (br || bg || bb) {
+ HAL_GPIO_WritePin(R2D_R_GPIO_Port, R2D_R_Pin, br && blink_state);
+ HAL_GPIO_WritePin(R2D_G_GPIO_Port, R2D_G_Pin, bg && blink_state);
+ HAL_GPIO_WritePin(R2D_B_GPIO_Port, R2D_B_Pin, bb && blink_state);
+ }
+
+ blink_state = !blink_state;
+
+ HAL_Delay(50);
+
+ /*
+ * TODO:
+ * Farbveläufe
+ **/
+
+ }
+ /* USER CODE END 3 */
+}
+
+/**
+ * @brief System Clock Configuration
+ * @retval None
+ */
+void SystemClock_Config(void)
+{
+ RCC_OscInitTypeDef RCC_OscInitStruct = {0};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
+
+ /** Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
+ RCC_OscInitStruct.HSIState = RCC_HSI_ON;
+ RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
+ RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL4;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
+ {
+ Error_Handler();
+ }
+
+ /** Initializes the CPU, AHB and APB buses clocks
+ */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
+ |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+ RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
+ {
+ Error_Handler();
+ }
+}
+
+/**
+ * @brief CAN Initialization Function
+ * @param None
+ * @retval None
+ */
+static void MX_CAN_Init(void)
+{
+
+ /* USER CODE BEGIN CAN_Init 0 */
+
+ /* USER CODE END CAN_Init 0 */
+
+ /* USER CODE BEGIN CAN_Init 1 */
+
+ /* USER CODE END CAN_Init 1 */
+ hcan.Instance = CAN;
+ hcan.Init.Prescaler = 2;
+ hcan.Init.Mode = CAN_MODE_NORMAL;
+ hcan.Init.SyncJumpWidth = CAN_SJW_1TQ;
+ hcan.Init.TimeSeg1 = CAN_BS1_13TQ;
+ hcan.Init.TimeSeg2 = CAN_BS2_2TQ;
+ hcan.Init.TimeTriggeredMode = DISABLE;
+ hcan.Init.AutoBusOff = DISABLE;
+ hcan.Init.AutoWakeUp = DISABLE;
+ hcan.Init.AutoRetransmission = DISABLE;
+ hcan.Init.ReceiveFifoLocked = DISABLE;
+ hcan.Init.TransmitFifoPriority = DISABLE;
+ if (HAL_CAN_Init(&hcan) != HAL_OK)
+ {
+ Error_Handler();
+ }
+ /* USER CODE BEGIN CAN_Init 2 */
+
+ /* USER CODE END CAN_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_GPIOA_CLK_ENABLE();
+ __HAL_RCC_GPIOB_CLK_ENABLE();
+
+ /*Configure GPIO pin Output Level */
+ HAL_GPIO_WritePin(GPIOA, TSON_R_Pin|TSON_G_Pin|TSON_B_Pin|IMD_LED_Pin
+ |AMS_LED_Pin|TSOFF_LED_Pin|R2D_R_Pin, GPIO_PIN_RESET);
+
+ /*Configure GPIO pin Output Level */
+ HAL_GPIO_WritePin(GPIOB, R2D_G_Pin|R2D_B_Pin, GPIO_PIN_RESET);
+
+ /*Configure GPIO pins : TSON_R_Pin TSON_G_Pin TSON_B_Pin IMD_LED_Pin
+ AMS_LED_Pin TSOFF_LED_Pin R2D_R_Pin */
+ GPIO_InitStruct.Pin = TSON_R_Pin|TSON_G_Pin|TSON_B_Pin|IMD_LED_Pin
+ |AMS_LED_Pin|TSOFF_LED_Pin|R2D_R_Pin;
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+
+ /*Configure GPIO pins : R2D_G_Pin R2D_B_Pin */
+ GPIO_InitStruct.Pin = R2D_G_Pin|R2D_B_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);
+
+ /*Configure GPIO pins : TSON_BTN_Pin SDC_Out_3V3_Pin SDC_In_3V3_Pin R2D_BTN_Pin
+ RMode_Out_3V3_Pin */
+ GPIO_InitStruct.Pin = TSON_BTN_Pin|SDC_Out_3V3_Pin|SDC_In_3V3_Pin|R2D_BTN_Pin
+ |RMode_Out_3V3_Pin;
+ GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
+
+/* USER CODE BEGIN MX_GPIO_Init_2 */
+/* USER CODE END MX_GPIO_Init_2 */
+}
+
+/* USER CODE BEGIN 4 */
+// CAN RX interrupt handler
+void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan) {
+
+ CAN_RxHeaderTypeDef rxHeader;
+ uint8_t rxData[8];
+
+ // Read frame from HW into buffer
+ if (HAL_CAN_GetRxMessage(hcan, CAN_RX_FIFO0, &rxHeader, rxData) != HAL_OK)
+ Error_Handler();
+
+ // Discard if it's not for us (shouldn't happen thanks to filter, but just to be sure)
+ if (rxHeader.StdId == CAN_ID_RX_AMS) {
+ uint8_t ams_info = rxData[0];
+ uint8_t imd_info = rxData[6];
+
+ dash_rx.ams_state = ams_info & 0b01111111;
+ dash_rx.sdc_closed = ams_info >> 7;
+ dash_rx.imd_ok = imd_info >> 7;
+ ams_last_tick = HAL_GetTick();
+ }
+
+
+ if (rxHeader.StdId == CAN_ID_RX_R2D) {
+ uint8_t r2d_info = rxData[1];
+
+ dash_rx.r2d_progress = r2d_info & 0b00001111;
+ }
+
+
+}
+/* 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/Software/Core/Src/stm32f3xx_hal_msp.c b/Software/Core/Src/stm32f3xx_hal_msp.c
new file mode 100644
index 0000000..72e1dd0
--- /dev/null
+++ b/Software/Core/Src/stm32f3xx_hal_msp.c
@@ -0,0 +1,156 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file stm32f3xx_hal_msp.c
+ * @brief This file provides code for the MSP Initialization
+ * and de-Initialization codes.
+ ******************************************************************************
+ * @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.
+ *
+ ******************************************************************************
+ */
+/* 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_SYSCFG_CLK_ENABLE();
+ __HAL_RCC_PWR_CLK_ENABLE();
+
+ /* System interrupt init*/
+
+ /* USER CODE BEGIN MspInit 1 */
+
+ /* USER CODE END MspInit 1 */
+}
+
+/**
+* @brief CAN MSP Initialization
+* This function configures the hardware resources used in this example
+* @param hcan: CAN handle pointer
+* @retval None
+*/
+void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan)
+{
+ GPIO_InitTypeDef GPIO_InitStruct = {0};
+ if(hcan->Instance==CAN)
+ {
+ /* USER CODE BEGIN CAN_MspInit 0 */
+
+ /* USER CODE END CAN_MspInit 0 */
+ /* Peripheral clock enable */
+ __HAL_RCC_CAN1_CLK_ENABLE();
+
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+ /**CAN GPIO Configuration
+ PA11 ------> CAN_RX
+ PA12 ------> CAN_TX
+ */
+ GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12;
+ GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
+ GPIO_InitStruct.Alternate = GPIO_AF9_CAN;
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+
+ /* CAN interrupt Init */
+ HAL_NVIC_SetPriority(USB_LP_CAN_RX0_IRQn, 0, 0);
+ HAL_NVIC_EnableIRQ(USB_LP_CAN_RX0_IRQn);
+ HAL_NVIC_SetPriority(CAN_RX1_IRQn, 0, 0);
+ HAL_NVIC_EnableIRQ(CAN_RX1_IRQn);
+ /* USER CODE BEGIN CAN_MspInit 1 */
+
+ /* USER CODE END CAN_MspInit 1 */
+
+ }
+
+}
+
+/**
+* @brief CAN MSP De-Initialization
+* This function freeze the hardware resources used in this example
+* @param hcan: CAN handle pointer
+* @retval None
+*/
+void HAL_CAN_MspDeInit(CAN_HandleTypeDef* hcan)
+{
+ if(hcan->Instance==CAN)
+ {
+ /* USER CODE BEGIN CAN_MspDeInit 0 */
+
+ /* USER CODE END CAN_MspDeInit 0 */
+ /* Peripheral clock disable */
+ __HAL_RCC_CAN1_CLK_DISABLE();
+
+ /**CAN GPIO Configuration
+ PA11 ------> CAN_RX
+ PA12 ------> CAN_TX
+ */
+ HAL_GPIO_DeInit(GPIOA, GPIO_PIN_11|GPIO_PIN_12);
+
+ /* CAN interrupt DeInit */
+ HAL_NVIC_DisableIRQ(USB_LP_CAN_RX0_IRQn);
+ HAL_NVIC_DisableIRQ(CAN_RX1_IRQn);
+ /* USER CODE BEGIN CAN_MspDeInit 1 */
+
+ /* USER CODE END CAN_MspDeInit 1 */
+ }
+
+}
+
+/* USER CODE BEGIN 1 */
+
+/* USER CODE END 1 */
diff --git a/Software/Core/Src/stm32f3xx_it.c b/Software/Core/Src/stm32f3xx_it.c
new file mode 100644
index 0000000..0847ddf
--- /dev/null
+++ b/Software/Core/Src/stm32f3xx_it.c
@@ -0,0 +1,231 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file stm32f3xx_it.c
+ * @brief Interrupt Service Routines.
+ ******************************************************************************
+ * @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.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Includes ------------------------------------------------------------------*/
+#include "main.h"
+#include "stm32f3xx_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 CAN_HandleTypeDef hcan;
+/* USER CODE BEGIN EV */
+
+/* USER CODE END EV */
+
+/******************************************************************************/
+/* Cortex-M4 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 Pre-fetch 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 */
+}
+
+/******************************************************************************/
+/* STM32F3xx 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_stm32f3xx.s). */
+/******************************************************************************/
+
+/**
+ * @brief This function handles USB low priority or CAN_RX0 interrupts.
+ */
+void USB_LP_CAN_RX0_IRQHandler(void)
+{
+ /* USER CODE BEGIN USB_LP_CAN_RX0_IRQn 0 */
+
+ /* USER CODE END USB_LP_CAN_RX0_IRQn 0 */
+ HAL_CAN_IRQHandler(&hcan);
+ /* USER CODE BEGIN USB_LP_CAN_RX0_IRQn 1 */
+
+ /* USER CODE END USB_LP_CAN_RX0_IRQn 1 */
+}
+
+/**
+ * @brief This function handles CAN RX1 interrupt.
+ */
+void CAN_RX1_IRQHandler(void)
+{
+ /* USER CODE BEGIN CAN_RX1_IRQn 0 */
+
+ /* USER CODE END CAN_RX1_IRQn 0 */
+ HAL_CAN_IRQHandler(&hcan);
+ /* USER CODE BEGIN CAN_RX1_IRQn 1 */
+
+ /* USER CODE END CAN_RX1_IRQn 1 */
+}
+
+/* USER CODE BEGIN 1 */
+
+/* USER CODE END 1 */
diff --git a/Software/Core/Src/syscalls.c b/Software/Core/Src/syscalls.c
new file mode 100644
index 0000000..f3462a0
--- /dev/null
+++ b/Software/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-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.
+ *
+ ******************************************************************************
+ */
+
+/* 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/Software/Core/Src/sysmem.c b/Software/Core/Src/sysmem.c
new file mode 100644
index 0000000..6122419
--- /dev/null
+++ b/Software/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) 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.
+ *
+ ******************************************************************************
+ */
+
+/* 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/Software/Core/Src/system_stm32f3xx.c b/Software/Core/Src/system_stm32f3xx.c
new file mode 100644
index 0000000..27d9350
--- /dev/null
+++ b/Software/Core/Src/system_stm32f3xx.c
@@ -0,0 +1,287 @@
+/**
+ ******************************************************************************
+ * @file system_stm32f3xx.c
+ * @author MCD Application Team
+ * @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
+ *
+ * 1. 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_stm32f3xx.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.
+ *
+ * 2. After each device reset the HSI (8 MHz) is used as system clock source.
+ * Then SystemInit() function is called, in "startup_stm32f3xx.s" file, to
+ * configure the system clock before to branch to main program.
+ *
+ * 3. This file configures the system clock as follows:
+ *=============================================================================
+ * Supported STM32F3xx device
+ *-----------------------------------------------------------------------------
+ * System Clock source | HSI
+ *-----------------------------------------------------------------------------
+ * SYSCLK(Hz) | 8000000
+ *-----------------------------------------------------------------------------
+ * HCLK(Hz) | 8000000
+ *-----------------------------------------------------------------------------
+ * AHB Prescaler | 1
+ *-----------------------------------------------------------------------------
+ * APB2 Prescaler | 1
+ *-----------------------------------------------------------------------------
+ * APB1 Prescaler | 1
+ *-----------------------------------------------------------------------------
+ * USB Clock | DISABLE
+ *-----------------------------------------------------------------------------
+ *=============================================================================
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2016 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 stm32f3xx_system
+ * @{
+ */
+
+/** @addtogroup STM32F3xx_System_Private_Includes
+ * @{
+ */
+
+#include "stm32f3xx.h"
+
+/**
+ * @}
+ */
+
+/** @addtogroup STM32F3xx_System_Private_TypesDefinitions
+ * @{
+ */
+
+/**
+ * @}
+ */
+
+/** @addtogroup STM32F3xx_System_Private_Defines
+ * @{
+ */
+#if !defined (HSE_VALUE)
+ #define HSE_VALUE ((uint32_t)8000000) /*!< Default value of the External oscillator in Hz.
+ This value can be provided and adapted by the user application. */
+#endif /* HSE_VALUE */
+
+#if !defined (HSI_VALUE)
+ #define HSI_VALUE ((uint32_t)8000000) /*!< Default value of the Internal oscillator in Hz.
+ This value can be provided and adapted by the user application. */
+#endif /* HSI_VALUE */
+
+/* Note: Following vector table addresses must be defined in line with linker
+ configuration. */
+/*!< Uncomment the following line if you need to relocate the vector table
+ anywhere in Flash or Sram, else the vector table is kept at the automatic
+ remap of boot address selected */
+/* #define USER_VECT_TAB_ADDRESS */
+
+#if defined(USER_VECT_TAB_ADDRESS)
+/*!< Uncomment the following line if you need to relocate your vector Table
+ in Sram else user remap will be done in Flash. */
+/* #define VECT_TAB_SRAM */
+#if defined(VECT_TAB_SRAM)
+#define VECT_TAB_BASE_ADDRESS SRAM_BASE /*!< Vector Table base address field.
+ This value must be a multiple of 0x200. */
+#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
+ This value must be a multiple of 0x200. */
+#else
+#define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field.
+ This value must be a multiple of 0x200. */
+#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
+ This value must be a multiple of 0x200. */
+#endif /* VECT_TAB_SRAM */
+#endif /* USER_VECT_TAB_ADDRESS */
+
+/******************************************************************************/
+/**
+ * @}
+ */
+
+/** @addtogroup STM32F3xx_System_Private_Macros
+ * @{
+ */
+
+/**
+ * @}
+ */
+
+/** @addtogroup STM32F3xx_System_Private_Variables
+ * @{
+ */
+ /* This 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 there is no need to
+ call the 2 first functions listed above, since SystemCoreClock variable is
+ updated automatically.
+ */
+uint32_t SystemCoreClock = 8000000;
+
+const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
+const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4};
+
+/**
+ * @}
+ */
+
+/** @addtogroup STM32F3xx_System_Private_FunctionPrototypes
+ * @{
+ */
+
+/**
+ * @}
+ */
+
+/** @addtogroup STM32F3xx_System_Private_Functions
+ * @{
+ */
+
+/**
+ * @brief Setup the microcontroller system
+ * @param None
+ * @retval None
+ */
+void SystemInit(void)
+{
+/* FPU settings --------------------------------------------------------------*/
+#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
+ SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */
+#endif
+
+ /* Configure the Vector Table location -------------------------------------*/
+#if defined(USER_VECT_TAB_ADDRESS)
+ SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
+#endif /* USER_VECT_TAB_ADDRESS */
+}
+
+/**
+ * @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 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(*) multiplied/divided by the PLL factors.
+ *
+ * (*) HSI_VALUE is a constant defined in stm32f3xx_hal.h file (default value
+ * 8 MHz) but the real value may vary depending on the variations
+ * in voltage and temperature.
+ *
+ * (**) HSE_VALUE is a constant defined in stm32f3xx_hal.h file (default value
+ * 8 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 = 0, pllmull = 0, pllsource = 0, predivfactor = 0;
+
+ /* Get SYSCLK source -------------------------------------------------------*/
+ tmp = RCC->CFGR & RCC_CFGR_SWS;
+
+ switch (tmp)
+ {
+ case RCC_CFGR_SWS_HSI: /* HSI used as system clock */
+ SystemCoreClock = HSI_VALUE;
+ break;
+ case RCC_CFGR_SWS_HSE: /* HSE used as system clock */
+ SystemCoreClock = HSE_VALUE;
+ break;
+ case RCC_CFGR_SWS_PLL: /* PLL used as system clock */
+ /* Get PLL clock source and multiplication factor ----------------------*/
+ pllmull = RCC->CFGR & RCC_CFGR_PLLMUL;
+ pllsource = RCC->CFGR & RCC_CFGR_PLLSRC;
+ pllmull = ( pllmull >> 18) + 2;
+
+#if defined (STM32F302xE) || defined (STM32F303xE) || defined (STM32F398xx)
+ predivfactor = (RCC->CFGR2 & RCC_CFGR2_PREDIV) + 1;
+ if (pllsource == RCC_CFGR_PLLSRC_HSE_PREDIV)
+ {
+ /* HSE oscillator clock selected as PREDIV1 clock entry */
+ SystemCoreClock = (HSE_VALUE / predivfactor) * pllmull;
+ }
+ else
+ {
+ /* HSI oscillator clock selected as PREDIV1 clock entry */
+ SystemCoreClock = (HSI_VALUE / predivfactor) * pllmull;
+ }
+#else
+ if (pllsource == RCC_CFGR_PLLSRC_HSI_DIV2)
+ {
+ /* HSI oscillator clock divided by 2 selected as PLL clock entry */
+ SystemCoreClock = (HSI_VALUE >> 1) * pllmull;
+ }
+ else
+ {
+ predivfactor = (RCC->CFGR2 & RCC_CFGR2_PREDIV) + 1;
+ /* HSE oscillator clock selected as PREDIV1 clock entry */
+ SystemCoreClock = (HSE_VALUE / predivfactor) * pllmull;
+ }
+#endif /* STM32F302xE || STM32F303xE || STM32F398xx */
+ break;
+ default: /* HSI used as system clock */
+ SystemCoreClock = HSI_VALUE;
+ break;
+ }
+ /* Compute HCLK clock frequency ----------------*/
+ /* Get HCLK prescaler */
+ tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)];
+ /* HCLK clock frequency */
+ SystemCoreClock >>= tmp;
+}
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
diff --git a/Software/Core/Startup/startup_stm32f302cbtx.s b/Software/Core/Startup/startup_stm32f302cbtx.s
new file mode 100644
index 0000000..b57b511
--- /dev/null
+++ b/Software/Core/Startup/startup_stm32f302cbtx.s
@@ -0,0 +1,441 @@
+/**
+ ******************************************************************************
+ * @file startup_stm32f302xc.s
+ * @author MCD Application Team
+ * @brief STM32F302xB/STM32F302xC devices vector table for 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,
+ * - Configure the clock system
+ * - 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) 2016 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
+
+.equ BootRAM, 0xF1E0F85F
+/**
+ * @brief This is the code that gets called when the processor first
+ * starts execution following a reset event. Only the absolutely
+ * necessary set is performed, after which the application
+ * supplied main() routine is called.
+ * @param None
+ * @retval : None
+*/
+
+ .section .text.Reset_Handler
+ .weak Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+ ldr sp, =_estack /* Atollic update: set stack pointer */
+
+/* Call the clock system initialization function.*/
+ bl SystemInit
+
+/* Copy the data segment initializers from flash to SRAM */
+ ldr r0, =_sdata
+ ldr r1, =_edata
+ ldr r2, =_sidata
+ movs r3, #0
+ b LoopCopyDataInit
+
+CopyDataInit:
+ ldr r4, [r2, r3]
+ str r4, [r0, r3]
+ adds r3, r3, #4
+
+LoopCopyDataInit:
+ adds r4, r0, r3
+ cmp r4, r1
+ bcc CopyDataInit
+
+/* Zero fill the bss segment. */
+ ldr r2, =_sbss
+ ldr r4, =_ebss
+ movs r3, #0
+ b LoopFillZerobss
+
+FillZerobss:
+ str r3, [r2]
+ adds r2, r2, #4
+
+LoopFillZerobss:
+ cmp r2, r4
+ bcc FillZerobss
+
+/* 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
+ .size g_pfnVectors, .-g_pfnVectors
+
+
+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_IRQHandler
+ .word TAMP_STAMP_IRQHandler
+ .word RTC_WKUP_IRQHandler
+ .word FLASH_IRQHandler
+ .word RCC_IRQHandler
+ .word EXTI0_IRQHandler
+ .word EXTI1_IRQHandler
+ .word EXTI2_TSC_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_2_IRQHandler
+ .word USB_HP_CAN_TX_IRQHandler
+ .word USB_LP_CAN_RX0_IRQHandler
+ .word CAN_RX1_IRQHandler
+ .word CAN_SCE_IRQHandler
+ .word EXTI9_5_IRQHandler
+ .word TIM1_BRK_TIM15_IRQHandler
+ .word TIM1_UP_TIM16_IRQHandler
+ .word TIM1_TRG_COM_TIM17_IRQHandler
+ .word TIM1_CC_IRQHandler
+ .word TIM2_IRQHandler
+ .word TIM3_IRQHandler
+ .word TIM4_IRQHandler
+ .word I2C1_EV_IRQHandler
+ .word I2C1_ER_IRQHandler
+ .word I2C2_EV_IRQHandler
+ .word I2C2_ER_IRQHandler
+ .word SPI1_IRQHandler
+ .word SPI2_IRQHandler
+ .word USART1_IRQHandler
+ .word USART2_IRQHandler
+ .word USART3_IRQHandler
+ .word EXTI15_10_IRQHandler
+ .word RTC_Alarm_IRQHandler
+ .word USBWakeUp_IRQHandler
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word SPI3_IRQHandler
+ .word UART4_IRQHandler
+ .word UART5_IRQHandler
+ .word TIM6_DAC_IRQHandler
+ .word 0
+ .word DMA2_Channel1_IRQHandler
+ .word DMA2_Channel2_IRQHandler
+ .word DMA2_Channel3_IRQHandler
+ .word DMA2_Channel4_IRQHandler
+ .word DMA2_Channel5_IRQHandler
+ .word 0
+ .word 0
+ .word 0
+ .word COMP1_2_IRQHandler
+ .word COMP4_6_IRQHandler
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word USB_HP_IRQHandler
+ .word USB_LP_IRQHandler
+ .word USBWakeUp_RMP_IRQHandler
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word FPU_IRQHandler
+
+/*******************************************************************************
+*
+* 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_IRQHandler
+ .thumb_set PVD_IRQHandler,Default_Handler
+
+ .weak TAMP_STAMP_IRQHandler
+ .thumb_set TAMP_STAMP_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_TSC_IRQHandler
+ .thumb_set EXTI2_TSC_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_2_IRQHandler
+ .thumb_set ADC1_2_IRQHandler,Default_Handler
+
+ .weak USB_HP_CAN_TX_IRQHandler
+ .thumb_set USB_HP_CAN_TX_IRQHandler,Default_Handler
+
+ .weak USB_LP_CAN_RX0_IRQHandler
+ .thumb_set USB_LP_CAN_RX0_IRQHandler,Default_Handler
+
+ .weak CAN_RX1_IRQHandler
+ .thumb_set CAN_RX1_IRQHandler,Default_Handler
+
+ .weak CAN_SCE_IRQHandler
+ .thumb_set CAN_SCE_IRQHandler,Default_Handler
+
+ .weak EXTI9_5_IRQHandler
+ .thumb_set EXTI9_5_IRQHandler,Default_Handler
+
+ .weak TIM1_BRK_TIM15_IRQHandler
+ .thumb_set TIM1_BRK_TIM15_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 TIM3_IRQHandler
+ .thumb_set TIM3_IRQHandler,Default_Handler
+
+ .weak TIM4_IRQHandler
+ .thumb_set TIM4_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 I2C2_EV_IRQHandler
+ .thumb_set I2C2_EV_IRQHandler,Default_Handler
+
+ .weak I2C2_ER_IRQHandler
+ .thumb_set I2C2_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 USART2_IRQHandler
+ .thumb_set USART2_IRQHandler,Default_Handler
+
+ .weak USART3_IRQHandler
+ .thumb_set USART3_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 USBWakeUp_IRQHandler
+ .thumb_set USBWakeUp_IRQHandler,Default_Handler
+
+ .weak SPI3_IRQHandler
+ .thumb_set SPI3_IRQHandler,Default_Handler
+
+ .weak UART4_IRQHandler
+ .thumb_set UART4_IRQHandler,Default_Handler
+
+ .weak UART5_IRQHandler
+ .thumb_set UART5_IRQHandler,Default_Handler
+
+ .weak TIM6_DAC_IRQHandler
+ .thumb_set TIM6_DAC_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 COMP1_2_IRQHandler
+ .thumb_set COMP1_2_IRQHandler,Default_Handler
+
+ .weak COMP4_6_IRQHandler
+ .thumb_set COMP4_6_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 USBWakeUp_RMP_IRQHandler
+ .thumb_set USBWakeUp_RMP_IRQHandler,Default_Handler
+
+ .weak FPU_IRQHandler
+ .thumb_set FPU_IRQHandler,Default_Handler
+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/Software/Dashboard Debug.cfg b/Software/Dashboard Debug.cfg
new file mode 100644
index 0000000..4bc2538
--- /dev/null
+++ b/Software/Dashboard Debug.cfg
@@ -0,0 +1,44 @@
+# This is an genericBoard board with a single STM32F302CBTx chip
+#
+# Generated by STM32CubeIDE
+# Take care that such file, as generated, may be overridden without any early notice. Please have a look to debug launch configuration setup(s)
+
+source [find interface/stlink-dap.cfg]
+
+
+set WORKAREASIZE 0x2000
+
+transport select "dapdirect_swd"
+
+set CHIPNAME STM32F302CBTx
+set BOARDNAME genericBoard
+
+# Enable debug when in low power modes
+set ENABLE_LOW_POWER 1
+
+# Stop Watchdog counters when halt
+set STOP_WATCHDOG 1
+
+# STlink Debug clock frequency
+set CLOCK_FREQ 8000
+
+# Reset configuration
+# use hardware reset, connect under reset
+# connect_assert_srst needed if low power mode application running (WFI...)
+reset_config srst_only srst_nogate connect_assert_srst
+set CONNECT_UNDER_RESET 1
+set CORE_RESET 0
+
+# ACCESS PORT NUMBER
+set AP_NUM 0
+# GDB PORT
+set GDB_PORT 3333
+
+
+
+
+
+# BCTM CPU variables
+
+source [find target/stm32f3x.cfg]
+
diff --git a/Software/Dashboard Debug.launch b/Software/Dashboard Debug.launch
new file mode 100644
index 0000000..eda76a2
--- /dev/null
+++ b/Software/Dashboard Debug.launch
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Software/Dashboard.ioc b/Software/Dashboard.ioc
new file mode 100644
index 0000000..d97f478
--- /dev/null
+++ b/Software/Dashboard.ioc
@@ -0,0 +1,194 @@
+#MicroXplorer Configuration settings - do not modify
+CAD.formats=
+CAD.pinconfig=
+CAD.provider=
+CAN.BS1=CAN_BS1_13TQ
+CAN.BS2=CAN_BS2_2TQ
+CAN.CalculateBaudRate=500000
+CAN.CalculateTimeBit=2000
+CAN.CalculateTimeQuantum=125.0
+CAN.IPParameters=CalculateTimeQuantum,CalculateTimeBit,CalculateBaudRate,Prescaler,BS1,BS2
+CAN.Prescaler=2
+File.Version=6
+KeepUserPlacement=false
+Mcu.CPN=STM32F302CBT6
+Mcu.Family=STM32F3
+Mcu.IP0=CAN
+Mcu.IP1=NVIC
+Mcu.IP2=RCC
+Mcu.IP3=SYS
+Mcu.IPNb=4
+Mcu.Name=STM32F302C(B-C)Tx
+Mcu.Package=LQFP48
+Mcu.Pin0=PA0
+Mcu.Pin1=PA1
+Mcu.Pin10=PA11
+Mcu.Pin11=PA12
+Mcu.Pin12=PA13
+Mcu.Pin13=PA14
+Mcu.Pin14=PB3
+Mcu.Pin15=PB4
+Mcu.Pin16=PB5
+Mcu.Pin17=PB8
+Mcu.Pin18=VP_SYS_VS_Systick
+Mcu.Pin2=PA2
+Mcu.Pin3=PA3
+Mcu.Pin4=PA4
+Mcu.Pin5=PA5
+Mcu.Pin6=PA7
+Mcu.Pin7=PB0
+Mcu.Pin8=PB1
+Mcu.Pin9=PB15
+Mcu.PinsNb=19
+Mcu.ThirdPartyNb=0
+Mcu.UserConstants=
+Mcu.UserName=STM32F302CBTx
+MxCube.Version=6.13.0
+MxDb.Version=DB.6.0.130
+NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
+NVIC.CAN_RX1_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
+NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
+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.USB_LP_CAN_RX0_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
+NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
+PA0.GPIOParameters=GPIO_Label
+PA0.GPIO_Label=TSON_R
+PA0.Locked=true
+PA0.Signal=GPIO_Output
+PA1.GPIOParameters=GPIO_Label
+PA1.GPIO_Label=TSON_G
+PA1.Locked=true
+PA1.Signal=GPIO_Output
+PA11.Mode=CAN_Activate
+PA11.Signal=CAN_RX
+PA12.Mode=CAN_Activate
+PA12.Signal=CAN_TX
+PA13.Mode=Serial_Wire
+PA13.Signal=SYS_JTMS-SWDIO
+PA14.Mode=Serial_Wire
+PA14.Signal=SYS_JTCK-SWCLK
+PA2.GPIOParameters=GPIO_Label
+PA2.GPIO_Label=TSON_B
+PA2.Locked=true
+PA2.Signal=GPIO_Output
+PA3.GPIOParameters=GPIO_Label
+PA3.GPIO_Label=IMD_LED
+PA3.Locked=true
+PA3.Signal=GPIO_Output
+PA4.GPIOParameters=GPIO_Label
+PA4.GPIO_Label=AMS_LED
+PA4.Locked=true
+PA4.Signal=GPIO_Output
+PA5.GPIOParameters=GPIO_Label
+PA5.GPIO_Label=TSOFF_LED
+PA5.Locked=true
+PA5.Signal=GPIO_Output
+PA7.GPIOParameters=GPIO_Label
+PA7.GPIO_Label=R2D_R
+PA7.Locked=true
+PA7.Signal=GPIO_Output
+PB0.GPIOParameters=GPIO_Label
+PB0.GPIO_Label=R2D_G
+PB0.Locked=true
+PB0.Signal=GPIO_Output
+PB1.GPIOParameters=GPIO_Label
+PB1.GPIO_Label=R2D_B
+PB1.Locked=true
+PB1.Signal=GPIO_Output
+PB15.GPIOParameters=GPIO_Label
+PB15.GPIO_Label=TSON_BTN
+PB15.Locked=true
+PB15.Signal=GPIO_Input
+PB3.GPIOParameters=GPIO_Label
+PB3.GPIO_Label=SDC_Out_3V3
+PB3.Locked=true
+PB3.Signal=GPIO_Input
+PB4.GPIOParameters=GPIO_Label
+PB4.GPIO_Label=SDC_In_3V3
+PB4.Locked=true
+PB4.Signal=GPIO_Input
+PB5.GPIOParameters=GPIO_Label
+PB5.GPIO_Label=R2D_BTN
+PB5.Locked=true
+PB5.Signal=GPIO_Input
+PB8.GPIOParameters=GPIO_Label
+PB8.GPIO_Label=RMode_Out_3V3
+PB8.Locked=true
+PB8.Signal=GPIO_Input
+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=STM32F302CBTx
+ProjectManager.FirmwarePackage=STM32Cube FW_F3 V1.11.5
+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=Dashboard.ioc
+ProjectManager.ProjectName=Dashboard
+ProjectManager.ProjectStructure=
+ProjectManager.RegisterCallBack=CAN
+ProjectManager.StackSize=0x400
+ProjectManager.TargetToolchain=STM32CubeIDE
+ProjectManager.ToolChainLocation=
+ProjectManager.UAScriptAfterPath=
+ProjectManager.UAScriptBeforePath=
+ProjectManager.UnderRoot=true
+ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_CAN_Init-CAN-false-HAL-true
+RCC.ADC12outputFreq_Value=16000000
+RCC.AHBFreq_Value=16000000
+RCC.APB1Freq_Value=16000000
+RCC.APB1TimFreq_Value=16000000
+RCC.APB2Freq_Value=16000000
+RCC.APB2TimFreq_Value=16000000
+RCC.CortexFreq_Value=16000000
+RCC.FCLKCortexFreq_Value=16000000
+RCC.FamilyName=M
+RCC.HCLKFreq_Value=16000000
+RCC.HSEPLLFreq_Value=8000000
+RCC.HSE_VALUE=8000000
+RCC.HSIPLLFreq_Value=4000000
+RCC.HSI_VALUE=8000000
+RCC.I2C1Freq_Value=8000000
+RCC.I2C2Freq_Value=8000000
+RCC.IPParameters=ADC12outputFreq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSEPLLFreq_Value,HSE_VALUE,HSIPLLFreq_Value,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,LSE_VALUE,LSI_VALUE,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSourceVirtual,TIM1Freq_Value,TIM2Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOOutput2Freq_Value
+RCC.LSE_VALUE=32768
+RCC.LSI_VALUE=40000
+RCC.MCOFreq_Value=16000000
+RCC.PLLCLKFreq_Value=16000000
+RCC.PLLMCOFreq_Value=8000000
+RCC.PLLMUL=RCC_PLL_MUL4
+RCC.RTCFreq_Value=40000
+RCC.RTCHSEDivFreq_Value=250000
+RCC.SYSCLKFreq_VALUE=16000000
+RCC.SYSCLKSourceVirtual=RCC_SYSCLKSOURCE_PLLCLK
+RCC.TIM1Freq_Value=16000000
+RCC.TIM2Freq_Value=16000000
+RCC.USART1Freq_Value=16000000
+RCC.USART2Freq_Value=16000000
+RCC.USART3Freq_Value=16000000
+RCC.USBFreq_Value=16000000
+RCC.VCOOutput2Freq_Value=4000000
+VP_SYS_VS_Systick.Mode=SysTick
+VP_SYS_VS_Systick.Signal=SYS_VS_Systick
+board=custom
+isbadioc=false
diff --git a/Software/Debug/Core/Src/main.cyclo b/Software/Debug/Core/Src/main.cyclo
new file mode 100644
index 0000000..f3dca12
--- /dev/null
+++ b/Software/Debug/Core/Src/main.cyclo
@@ -0,0 +1,6 @@
+../Core/Src/main.c:112:5:main 34
+../Core/Src/main.c:293:6:SystemClock_Config 3
+../Core/Src/main.c:332:13:MX_CAN_Init 2
+../Core/Src/main.c:369:13:MX_GPIO_Init 1
+../Core/Src/main.c:416:6:HAL_CAN_RxFifo0MsgPendingCallback 4
+../Core/Src/main.c:451:6:Error_Handler 1
diff --git a/Software/Debug/Core/Src/main.d b/Software/Debug/Core/Src/main.d
new file mode 100644
index 0000000..3b3ec66
--- /dev/null
+++ b/Software/Debug/Core/Src/main.d
@@ -0,0 +1,56 @@
+Core/Src/main.o: ../Core/Src/main.c ../Core/Inc/main.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal.h \
+ ../Core/Inc/stm32f3xx_hal_conf.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f3xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f302xc.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/STM32F3xx/Include/system_stm32f3xx.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_exti.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_cortex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_can.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pwr.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pwr_ex.h
+../Core/Inc/main.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal.h:
+../Core/Inc/stm32f3xx_hal_conf.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f3xx.h:
+../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f302xc.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/STM32F3xx/Include/system_stm32f3xx.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_exti.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_cortex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_can.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pwr.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pwr_ex.h:
diff --git a/Software/Debug/Core/Src/main.su b/Software/Debug/Core/Src/main.su
new file mode 100644
index 0000000..11535f3
--- /dev/null
+++ b/Software/Debug/Core/Src/main.su
@@ -0,0 +1,6 @@
+../Core/Src/main.c:112:5:main 80 static
+../Core/Src/main.c:293:6:SystemClock_Config 72 static
+../Core/Src/main.c:332:13:MX_CAN_Init 8 static
+../Core/Src/main.c:369:13:MX_GPIO_Init 40 static
+../Core/Src/main.c:416:6:HAL_CAN_RxFifo0MsgPendingCallback 56 static
+../Core/Src/main.c:451:6:Error_Handler 4 static,ignoring_inline_asm
diff --git a/Software/Debug/Core/Src/stm32f3xx_hal_msp.cyclo b/Software/Debug/Core/Src/stm32f3xx_hal_msp.cyclo
new file mode 100644
index 0000000..446d5b6
--- /dev/null
+++ b/Software/Debug/Core/Src/stm32f3xx_hal_msp.cyclo
@@ -0,0 +1,3 @@
+../Core/Src/stm32f3xx_hal_msp.c:63:6:HAL_MspInit 1
+../Core/Src/stm32f3xx_hal_msp.c:86:6:HAL_CAN_MspInit 2
+../Core/Src/stm32f3xx_hal_msp.c:128:6:HAL_CAN_MspDeInit 2
diff --git a/Software/Debug/Core/Src/stm32f3xx_hal_msp.d b/Software/Debug/Core/Src/stm32f3xx_hal_msp.d
new file mode 100644
index 0000000..5fe3976
--- /dev/null
+++ b/Software/Debug/Core/Src/stm32f3xx_hal_msp.d
@@ -0,0 +1,56 @@
+Core/Src/stm32f3xx_hal_msp.o: ../Core/Src/stm32f3xx_hal_msp.c \
+ ../Core/Inc/main.h ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal.h \
+ ../Core/Inc/stm32f3xx_hal_conf.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f3xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f302xc.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/STM32F3xx/Include/system_stm32f3xx.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_exti.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_cortex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_can.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pwr.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pwr_ex.h
+../Core/Inc/main.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal.h:
+../Core/Inc/stm32f3xx_hal_conf.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f3xx.h:
+../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f302xc.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/STM32F3xx/Include/system_stm32f3xx.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_exti.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_cortex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_can.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pwr.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pwr_ex.h:
diff --git a/Software/Debug/Core/Src/stm32f3xx_hal_msp.su b/Software/Debug/Core/Src/stm32f3xx_hal_msp.su
new file mode 100644
index 0000000..ebb1dcb
--- /dev/null
+++ b/Software/Debug/Core/Src/stm32f3xx_hal_msp.su
@@ -0,0 +1,3 @@
+../Core/Src/stm32f3xx_hal_msp.c:63:6:HAL_MspInit 16 static
+../Core/Src/stm32f3xx_hal_msp.c:86:6:HAL_CAN_MspInit 48 static
+../Core/Src/stm32f3xx_hal_msp.c:128:6:HAL_CAN_MspDeInit 16 static
diff --git a/Software/Debug/Core/Src/stm32f3xx_it.cyclo b/Software/Debug/Core/Src/stm32f3xx_it.cyclo
new file mode 100644
index 0000000..928a88e
--- /dev/null
+++ b/Software/Debug/Core/Src/stm32f3xx_it.cyclo
@@ -0,0 +1,11 @@
+../Core/Src/stm32f3xx_it.c:69:6:NMI_Handler 1
+../Core/Src/stm32f3xx_it.c:84:6:HardFault_Handler 1
+../Core/Src/stm32f3xx_it.c:99:6:MemManage_Handler 1
+../Core/Src/stm32f3xx_it.c:114:6:BusFault_Handler 1
+../Core/Src/stm32f3xx_it.c:129:6:UsageFault_Handler 1
+../Core/Src/stm32f3xx_it.c:144:6:SVC_Handler 1
+../Core/Src/stm32f3xx_it.c:157:6:DebugMon_Handler 1
+../Core/Src/stm32f3xx_it.c:170:6:PendSV_Handler 1
+../Core/Src/stm32f3xx_it.c:183:6:SysTick_Handler 1
+../Core/Src/stm32f3xx_it.c:204:6:USB_LP_CAN_RX0_IRQHandler 1
+../Core/Src/stm32f3xx_it.c:218:6:CAN_RX1_IRQHandler 1
diff --git a/Software/Debug/Core/Src/stm32f3xx_it.d b/Software/Debug/Core/Src/stm32f3xx_it.d
new file mode 100644
index 0000000..222564a
--- /dev/null
+++ b/Software/Debug/Core/Src/stm32f3xx_it.d
@@ -0,0 +1,58 @@
+Core/Src/stm32f3xx_it.o: ../Core/Src/stm32f3xx_it.c ../Core/Inc/main.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal.h \
+ ../Core/Inc/stm32f3xx_hal_conf.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f3xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f302xc.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/STM32F3xx/Include/system_stm32f3xx.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_exti.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_cortex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_can.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pwr.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pwr_ex.h \
+ ../Core/Inc/stm32f3xx_it.h
+../Core/Inc/main.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal.h:
+../Core/Inc/stm32f3xx_hal_conf.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f3xx.h:
+../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f302xc.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/STM32F3xx/Include/system_stm32f3xx.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_exti.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_cortex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_can.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pwr.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pwr_ex.h:
+../Core/Inc/stm32f3xx_it.h:
diff --git a/Software/Debug/Core/Src/stm32f3xx_it.su b/Software/Debug/Core/Src/stm32f3xx_it.su
new file mode 100644
index 0000000..4e15778
--- /dev/null
+++ b/Software/Debug/Core/Src/stm32f3xx_it.su
@@ -0,0 +1,11 @@
+../Core/Src/stm32f3xx_it.c:69:6:NMI_Handler 4 static
+../Core/Src/stm32f3xx_it.c:84:6:HardFault_Handler 4 static
+../Core/Src/stm32f3xx_it.c:99:6:MemManage_Handler 4 static
+../Core/Src/stm32f3xx_it.c:114:6:BusFault_Handler 4 static
+../Core/Src/stm32f3xx_it.c:129:6:UsageFault_Handler 4 static
+../Core/Src/stm32f3xx_it.c:144:6:SVC_Handler 4 static
+../Core/Src/stm32f3xx_it.c:157:6:DebugMon_Handler 4 static
+../Core/Src/stm32f3xx_it.c:170:6:PendSV_Handler 4 static
+../Core/Src/stm32f3xx_it.c:183:6:SysTick_Handler 8 static
+../Core/Src/stm32f3xx_it.c:204:6:USB_LP_CAN_RX0_IRQHandler 8 static
+../Core/Src/stm32f3xx_it.c:218:6:CAN_RX1_IRQHandler 8 static
diff --git a/Software/Debug/Core/Src/subdir.mk b/Software/Debug/Core/Src/subdir.mk
new file mode 100644
index 0000000..ee8e21d
--- /dev/null
+++ b/Software/Debug/Core/Src/subdir.mk
@@ -0,0 +1,42 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+# Toolchain: GNU Tools for STM32 (12.3.rel1)
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables
+C_SRCS += \
+../Core/Src/main.c \
+../Core/Src/stm32f3xx_hal_msp.c \
+../Core/Src/stm32f3xx_it.c \
+../Core/Src/syscalls.c \
+../Core/Src/sysmem.c \
+../Core/Src/system_stm32f3xx.c
+
+OBJS += \
+./Core/Src/main.o \
+./Core/Src/stm32f3xx_hal_msp.o \
+./Core/Src/stm32f3xx_it.o \
+./Core/Src/syscalls.o \
+./Core/Src/sysmem.o \
+./Core/Src/system_stm32f3xx.o
+
+C_DEPS += \
+./Core/Src/main.d \
+./Core/Src/stm32f3xx_hal_msp.d \
+./Core/Src/stm32f3xx_it.d \
+./Core/Src/syscalls.d \
+./Core/Src/sysmem.d \
+./Core/Src/system_stm32f3xx.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 -DSTM32F302xC -c -I../Core/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -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/main.cyclo ./Core/Src/main.d ./Core/Src/main.o ./Core/Src/main.su ./Core/Src/stm32f3xx_hal_msp.cyclo ./Core/Src/stm32f3xx_hal_msp.d ./Core/Src/stm32f3xx_hal_msp.o ./Core/Src/stm32f3xx_hal_msp.su ./Core/Src/stm32f3xx_it.cyclo ./Core/Src/stm32f3xx_it.d ./Core/Src/stm32f3xx_it.o ./Core/Src/stm32f3xx_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_stm32f3xx.cyclo ./Core/Src/system_stm32f3xx.d ./Core/Src/system_stm32f3xx.o ./Core/Src/system_stm32f3xx.su
+
+.PHONY: clean-Core-2f-Src
+
diff --git a/Software/Debug/Core/Src/syscalls.cyclo b/Software/Debug/Core/Src/syscalls.cyclo
new file mode 100644
index 0000000..6cbfdd0
--- /dev/null
+++ b/Software/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/Software/Debug/Core/Src/syscalls.d b/Software/Debug/Core/Src/syscalls.d
new file mode 100644
index 0000000..8667c70
--- /dev/null
+++ b/Software/Debug/Core/Src/syscalls.d
@@ -0,0 +1 @@
+Core/Src/syscalls.o: ../Core/Src/syscalls.c
diff --git a/Software/Debug/Core/Src/syscalls.su b/Software/Debug/Core/Src/syscalls.su
new file mode 100644
index 0000000..50b547a
--- /dev/null
+++ b/Software/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/Software/Debug/Core/Src/sysmem.cyclo b/Software/Debug/Core/Src/sysmem.cyclo
new file mode 100644
index 0000000..0090c10
--- /dev/null
+++ b/Software/Debug/Core/Src/sysmem.cyclo
@@ -0,0 +1 @@
+../Core/Src/sysmem.c:53:7:_sbrk 3
diff --git a/Software/Debug/Core/Src/sysmem.d b/Software/Debug/Core/Src/sysmem.d
new file mode 100644
index 0000000..74fecf9
--- /dev/null
+++ b/Software/Debug/Core/Src/sysmem.d
@@ -0,0 +1 @@
+Core/Src/sysmem.o: ../Core/Src/sysmem.c
diff --git a/Software/Debug/Core/Src/sysmem.su b/Software/Debug/Core/Src/sysmem.su
new file mode 100644
index 0000000..12d5f17
--- /dev/null
+++ b/Software/Debug/Core/Src/sysmem.su
@@ -0,0 +1 @@
+../Core/Src/sysmem.c:53:7:_sbrk 32 static
diff --git a/Software/Debug/Core/Src/system_stm32f3xx.cyclo b/Software/Debug/Core/Src/system_stm32f3xx.cyclo
new file mode 100644
index 0000000..16fd576
--- /dev/null
+++ b/Software/Debug/Core/Src/system_stm32f3xx.cyclo
@@ -0,0 +1,2 @@
+../Core/Src/system_stm32f3xx.c:170:6:SystemInit 1
+../Core/Src/system_stm32f3xx.c:219:6:SystemCoreClockUpdate 6
diff --git a/Software/Debug/Core/Src/system_stm32f3xx.d b/Software/Debug/Core/Src/system_stm32f3xx.d
new file mode 100644
index 0000000..4e8907a
--- /dev/null
+++ b/Software/Debug/Core/Src/system_stm32f3xx.d
@@ -0,0 +1,55 @@
+Core/Src/system_stm32f3xx.o: ../Core/Src/system_stm32f3xx.c \
+ ../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f3xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f302xc.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/STM32F3xx/Include/system_stm32f3xx.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal.h \
+ ../Core/Inc/stm32f3xx_hal_conf.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_exti.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_cortex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_can.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c_ex.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pwr.h \
+ ../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pwr_ex.h
+../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f3xx.h:
+../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f302xc.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/STM32F3xx/Include/system_stm32f3xx.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal.h:
+../Core/Inc/stm32f3xx_hal_conf.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_gpio_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_exti.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_dma_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_cortex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_can.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_i2c_ex.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pwr.h:
+../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_pwr_ex.h:
diff --git a/Software/Debug/Core/Src/system_stm32f3xx.su b/Software/Debug/Core/Src/system_stm32f3xx.su
new file mode 100644
index 0000000..1925747
--- /dev/null
+++ b/Software/Debug/Core/Src/system_stm32f3xx.su
@@ -0,0 +1,2 @@
+../Core/Src/system_stm32f3xx.c:170:6:SystemInit 4 static
+../Core/Src/system_stm32f3xx.c:219:6:SystemCoreClockUpdate 24 static
diff --git a/Software/Debug/Core/Startup/startup_stm32f302cbtx.d b/Software/Debug/Core/Startup/startup_stm32f302cbtx.d
new file mode 100644
index 0000000..269aa48
--- /dev/null
+++ b/Software/Debug/Core/Startup/startup_stm32f302cbtx.d
@@ -0,0 +1,2 @@
+Core/Startup/startup_stm32f302cbtx.o: \
+ ../Core/Startup/startup_stm32f302cbtx.s
diff --git a/Software/Debug/Core/Startup/subdir.mk b/Software/Debug/Core/Startup/subdir.mk
new file mode 100644
index 0000000..30ea33d
--- /dev/null
+++ b/Software/Debug/Core/Startup/subdir.mk
@@ -0,0 +1,27 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+# Toolchain: GNU Tools for STM32 (12.3.rel1)
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables
+S_SRCS += \
+../Core/Startup/startup_stm32f302cbtx.s
+
+OBJS += \
+./Core/Startup/startup_stm32f302cbtx.o
+
+S_DEPS += \
+./Core/Startup/startup_stm32f302cbtx.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_stm32f302cbtx.d ./Core/Startup/startup_stm32f302cbtx.o
+
+.PHONY: clean-Core-2f-Startup
+
diff --git a/Software/Debug/Dashboard.elf b/Software/Debug/Dashboard.elf
new file mode 100644
index 0000000..d464963
Binary files /dev/null and b/Software/Debug/Dashboard.elf differ
diff --git a/Software/Debug/Dashboard.list b/Software/Debug/Dashboard.list
new file mode 100644
index 0000000..ca540d1
--- /dev/null
+++ b/Software/Debug/Dashboard.list
@@ -0,0 +1,7795 @@
+
+Dashboard.elf: file format elf32-littlearm
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 .isr_vector 00000188 08000000 08000000 00001000 2**0
+ CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 1 .text 000030f4 08000188 08000188 00001188 2**2
+ CONTENTS, ALLOC, LOAD, READONLY, CODE
+ 2 .rodata 00000030 0800327c 0800327c 0000427c 2**2
+ CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 3 .ARM.extab 00000000 080032ac 080032ac 0000500c 2**0
+ CONTENTS
+ 4 .ARM 00000000 080032ac 080032ac 0000500c 2**0
+ CONTENTS
+ 5 .preinit_array 00000000 080032ac 080032ac 0000500c 2**0
+ CONTENTS, ALLOC, LOAD, DATA
+ 6 .init_array 00000004 080032ac 080032ac 000042ac 2**2
+ CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 7 .fini_array 00000004 080032b0 080032b0 000042b0 2**2
+ CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 8 .data 0000000c 20000000 080032b4 00005000 2**2
+ CONTENTS, ALLOC, LOAD, DATA
+ 9 .bss 000000bc 2000000c 080032c0 0000500c 2**2
+ ALLOC
+ 10 ._user_heap_stack 00000600 200000c8 080032c0 000050c8 2**0
+ ALLOC
+ 11 .ARM.attributes 00000030 00000000 00000000 0000500c 2**0
+ CONTENTS, READONLY
+ 12 .debug_info 00006338 00000000 00000000 0000503c 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 13 .debug_abbrev 000013d9 00000000 00000000 0000b374 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 14 .debug_aranges 00000568 00000000 00000000 0000c750 2**3
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 15 .debug_rnglists 000003f5 00000000 00000000 0000ccb8 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 16 .debug_macro 0001a91b 00000000 00000000 0000d0ad 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 17 .debug_line 00006ae1 00000000 00000000 000279c8 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 18 .debug_str 0009e1e0 00000000 00000000 0002e4a9 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 19 .comment 00000043 00000000 00000000 000cc689 2**0
+ CONTENTS, READONLY
+ 20 .debug_frame 000014a0 00000000 00000000 000cc6cc 2**2
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 21 .debug_line_str 00000068 00000000 00000000 000cdb6c 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+
+Disassembly of section .text:
+
+08000188 <__do_global_dtors_aux>:
+ 8000188: b510 push {r4, lr}
+ 800018a: 4c05 ldr r4, [pc, #20] @ (80001a0 <__do_global_dtors_aux+0x18>)
+ 800018c: 7823 ldrb r3, [r4, #0]
+ 800018e: b933 cbnz r3, 800019e <__do_global_dtors_aux+0x16>
+ 8000190: 4b04 ldr r3, [pc, #16] @ (80001a4 <__do_global_dtors_aux+0x1c>)
+ 8000192: b113 cbz r3, 800019a <__do_global_dtors_aux+0x12>
+ 8000194: 4804 ldr r0, [pc, #16] @ (80001a8 <__do_global_dtors_aux+0x20>)
+ 8000196: f3af 8000 nop.w
+ 800019a: 2301 movs r3, #1
+ 800019c: 7023 strb r3, [r4, #0]
+ 800019e: bd10 pop {r4, pc}
+ 80001a0: 2000000c .word 0x2000000c
+ 80001a4: 00000000 .word 0x00000000
+ 80001a8: 08003264 .word 0x08003264
+
+080001ac :
+ 80001ac: b508 push {r3, lr}
+ 80001ae: 4b03 ldr r3, [pc, #12] @ (80001bc )
+ 80001b0: b11b cbz r3, 80001ba
+ 80001b2: 4903 ldr r1, [pc, #12] @ (80001c0 )
+ 80001b4: 4803 ldr r0, [pc, #12] @ (80001c4 )
+ 80001b6: f3af 8000 nop.w
+ 80001ba: bd08 pop {r3, pc}
+ 80001bc: 00000000 .word 0x00000000
+ 80001c0: 20000010 .word 0x20000010
+ 80001c4: 08003264 .word 0x08003264
+
+080001c8 :
+/**
+ * @brief The application entry point.
+ * @retval int
+ */
+int main(void)
+{
+ 80001c8: b580 push {r7, lr}
+ 80001ca: b092 sub sp, #72 @ 0x48
+ 80001cc: af00 add r7, sp, #0
+ /* USER CODE END 1 */
+
+ /* MCU Configuration--------------------------------------------------------*/
+
+ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
+ HAL_Init();
+ 80001ce: f000 fc1f bl 8000a10
+ /* USER CODE BEGIN Init */
+
+ /* USER CODE END Init */
+
+ /* Configure the system clock */
+ SystemClock_Config();
+ 80001d2: f000 f9ff bl 80005d4
+ /* USER CODE BEGIN SysInit */
+
+ /* USER CODE END SysInit */
+
+ /* Initialize all configured peripherals */
+ MX_GPIO_Init();
+ 80001d6: f000 fa73 bl 80006c0
+ MX_CAN_Init();
+ 80001da: f000 fa3b bl 8000654
+ /* USER CODE BEGIN 2 */
+
+ txHeader.IDE = CAN_ID_STD;
+ 80001de: 4bae ldr r3, [pc, #696] @ (8000498 )
+ 80001e0: 2200 movs r2, #0
+ 80001e2: 609a str r2, [r3, #8]
+ txHeader.StdId = CAN_ID_TX;
+ 80001e4: 4bac ldr r3, [pc, #688] @ (8000498 )
+ 80001e6: f44f 6284 mov.w r2, #1056 @ 0x420
+ 80001ea: 601a str r2, [r3, #0]
+ txHeader.RTR = CAN_RTR_DATA;
+ 80001ec: 4baa ldr r3, [pc, #680] @ (8000498 )
+ 80001ee: 2200 movs r2, #0
+ 80001f0: 60da str r2, [r3, #12]
+ txHeader.DLC = 1;
+ 80001f2: 4ba9 ldr r3, [pc, #676] @ (8000498 )
+ 80001f4: 2201 movs r2, #1
+ 80001f6: 611a str r2, [r3, #16]
+
+
+ if (HAL_CAN_Start(&hcan) != HAL_OK)
+ 80001f8: 48a8 ldr r0, [pc, #672] @ (800049c )
+ 80001fa: f000 fea3 bl 8000f44
+ 80001fe: 4603 mov r3, r0
+ 8000200: 2b00 cmp r3, #0
+ 8000202: d001 beq.n 8000208
+ Error_Handler();
+ 8000204: f000 fb06 bl 8000814
+
+ CAN_FilterTypeDef canfilterconfig;
+
+ canfilterconfig.FilterActivation = CAN_FILTER_ENABLE;
+ 8000208: 2301 movs r3, #1
+ 800020a: 627b str r3, [r7, #36] @ 0x24
+ canfilterconfig.FilterBank = 0;
+ 800020c: 2300 movs r3, #0
+ 800020e: 61bb str r3, [r7, #24]
+ canfilterconfig.FilterFIFOAssignment = CAN_FILTER_FIFO0;
+ 8000210: 2300 movs r3, #0
+ 8000212: 617b str r3, [r7, #20]
+ canfilterconfig.FilterIdHigh = CAN_ID_RX_AMS << (16 - 11);
+ 8000214: f44f 73a0 mov.w r3, #320 @ 0x140
+ 8000218: 607b str r3, [r7, #4]
+ canfilterconfig.FilterIdLow = CAN_ID_RX_R2D << (16 - 11);
+ 800021a: f44f 4302 mov.w r3, #33280 @ 0x8200
+ 800021e: 60bb str r3, [r7, #8]
+ canfilterconfig.FilterMaskIdHigh = 0x7FF << (16 - 11);
+ 8000220: f64f 73e0 movw r3, #65504 @ 0xffe0
+ 8000224: 60fb str r3, [r7, #12]
+ canfilterconfig.FilterMaskIdLow = 0x7FF << (16 - 11);
+ 8000226: f64f 73e0 movw r3, #65504 @ 0xffe0
+ 800022a: 613b str r3, [r7, #16]
+ canfilterconfig.FilterMode = CAN_FILTERMODE_IDMASK;
+ 800022c: 2300 movs r3, #0
+ 800022e: 61fb str r3, [r7, #28]
+ canfilterconfig.FilterScale = CAN_FILTERSCALE_32BIT;
+ 8000230: 2301 movs r3, #1
+ 8000232: 623b str r3, [r7, #32]
+ canfilterconfig.SlaveStartFilterBank = 14;
+ 8000234: 230e movs r3, #14
+ 8000236: 62bb str r3, [r7, #40] @ 0x28
+
+ if (HAL_CAN_ConfigFilter(&hcan, &canfilterconfig) != HAL_OK) {
+ 8000238: 1d3b adds r3, r7, #4
+ 800023a: 4619 mov r1, r3
+ 800023c: 4897 ldr r0, [pc, #604] @ (800049c )
+ 800023e: f000 fdb7 bl 8000db0
+ 8000242: 4603 mov r3, r0
+ 8000244: 2b00 cmp r3, #0
+ 8000246: d001 beq.n 800024c
+ Error_Handler();
+ 8000248: f000 fae4 bl 8000814
+ }
+
+ if (HAL_CAN_ActivateNotification(&hcan, CAN_IT_RX_FIFO0_MSG_PENDING) != HAL_OK)
+ 800024c: 2102 movs r1, #2
+ 800024e: 4893 ldr r0, [pc, #588] @ (800049c )
+ 8000250: f001 f8ae bl 80013b0
+ 8000254: 4603 mov r3, r0
+ 8000256: 2b00 cmp r3, #0
+ 8000258: d001 beq.n 800025e
+ Error_Handler();
+ 800025a: f000 fadb bl 8000814
+
+ // blink flags
+ int blink_state = 0;
+ 800025e: 2300 movs r3, #0
+ 8000260: 647b str r3, [r7, #68] @ 0x44
+ while (1)
+ {
+ /* USER CODE END WHILE */
+
+ /* USER CODE BEGIN 3 */
+ dash_tx.tson = HAL_GPIO_ReadPin(TSON_BTN_GPIO_Port, TSON_BTN_Pin);
+ 8000262: f44f 4100 mov.w r1, #32768 @ 0x8000
+ 8000266: 488e ldr r0, [pc, #568] @ (80004a0 )
+ 8000268: f001 fd92 bl 8001d90
+ 800026c: 4603 mov r3, r0
+ 800026e: 01db lsls r3, r3, #7
+ 8000270: b25b sxtb r3, r3
+ 8000272: 11db asrs r3, r3, #7
+ 8000274: b259 sxtb r1, r3
+ 8000276: 4a8b ldr r2, [pc, #556] @ (80004a4 )
+ 8000278: 7813 ldrb r3, [r2, #0]
+ 800027a: f361 0341 bfi r3, r1, #1, #1
+ 800027e: 7013 strb r3, [r2, #0]
+ dash_tx.r2d = HAL_GPIO_ReadPin(R2D_BTN_GPIO_Port, R2D_BTN_Pin);
+ 8000280: 2120 movs r1, #32
+ 8000282: 4887 ldr r0, [pc, #540] @ (80004a0 )
+ 8000284: f001 fd84 bl 8001d90
+ 8000288: 4603 mov r3, r0
+ 800028a: 01db lsls r3, r3, #7
+ 800028c: b25b sxtb r3, r3
+ 800028e: 11db asrs r3, r3, #7
+ 8000290: b259 sxtb r1, r3
+ 8000292: 4a84 ldr r2, [pc, #528] @ (80004a4 )
+ 8000294: 7813 ldrb r3, [r2, #0]
+ 8000296: f361 0300 bfi r3, r1, #0, #1
+ 800029a: 7013 strb r3, [r2, #0]
+ dash_tx.sdc_in = HAL_GPIO_ReadPin(SDC_In_3V3_GPIO_Port, SDC_In_3V3_Pin);
+ 800029c: 2110 movs r1, #16
+ 800029e: 4880 ldr r0, [pc, #512] @ (80004a0 )
+ 80002a0: f001 fd76 bl 8001d90
+ 80002a4: 4603 mov r3, r0
+ 80002a6: 01db lsls r3, r3, #7
+ 80002a8: b25b sxtb r3, r3
+ 80002aa: 11db asrs r3, r3, #7
+ 80002ac: b259 sxtb r1, r3
+ 80002ae: 4a7d ldr r2, [pc, #500] @ (80004a4 )
+ 80002b0: 7813 ldrb r3, [r2, #0]
+ 80002b2: f361 03c3 bfi r3, r1, #3, #1
+ 80002b6: 7013 strb r3, [r2, #0]
+ dash_tx.sdc_out = HAL_GPIO_ReadPin(SDC_Out_3V3_GPIO_Port, SDC_Out_3V3_Pin);
+ 80002b8: 2108 movs r1, #8
+ 80002ba: 4879 ldr r0, [pc, #484] @ (80004a0 )
+ 80002bc: f001 fd68 bl 8001d90
+ 80002c0: 4603 mov r3, r0
+ 80002c2: 01db lsls r3, r3, #7
+ 80002c4: b25b sxtb r3, r3
+ 80002c6: 11db asrs r3, r3, #7
+ 80002c8: b259 sxtb r1, r3
+ 80002ca: 4a76 ldr r2, [pc, #472] @ (80004a4 )
+ 80002cc: 7813 ldrb r3, [r2, #0]
+ 80002ce: f361 1304 bfi r3, r1, #4, #1
+ 80002d2: 7013 strb r3, [r2, #0]
+ dash_tx.racemode = HAL_GPIO_ReadPin(RMode_Out_3V3_GPIO_Port, RMode_Out_3V3_Pin);
+ 80002d4: f44f 7180 mov.w r1, #256 @ 0x100
+ 80002d8: 4871 ldr r0, [pc, #452] @ (80004a0 )
+ 80002da: f001 fd59 bl 8001d90
+ 80002de: 4603 mov r3, r0
+ 80002e0: 01db lsls r3, r3, #7
+ 80002e2: b25b sxtb r3, r3
+ 80002e4: 11db asrs r3, r3, #7
+ 80002e6: b259 sxtb r1, r3
+ 80002e8: 4a6e ldr r2, [pc, #440] @ (80004a4 )
+ 80002ea: 7813 ldrb r3, [r2, #0]
+ 80002ec: f361 0382 bfi r3, r1, #2, #1
+ 80002f0: 7013 strb r3, [r2, #0]
+
+ if ((HAL_GetTick() - last_send_can_tick ) > 200) {
+ 80002f2: f000 fbe7 bl 8000ac4
+ 80002f6: 4602 mov r2, r0
+ 80002f8: 4b6b ldr r3, [pc, #428] @ (80004a8 )
+ 80002fa: 681b ldr r3, [r3, #0]
+ 80002fc: 1ad3 subs r3, r2, r3
+ 80002fe: 2bc8 cmp r3, #200 @ 0xc8
+ 8000300: d90f bls.n 8000322
+ if (HAL_CAN_AddTxMessage(&hcan, &txHeader, (uint8_t*) &dash_tx, &txMailbox) != HAL_OK) {
+ 8000302: 4b6a ldr r3, [pc, #424] @ (80004ac )
+ 8000304: 4a67 ldr r2, [pc, #412] @ (80004a4 )
+ 8000306: 4964 ldr r1, [pc, #400] @ (8000498 )
+ 8000308: 4864 ldr r0, [pc, #400] @ (800049c )
+ 800030a: f000 fe5f bl 8000fcc
+ 800030e: 4603 mov r3, r0
+ 8000310: 2b00 cmp r3, #0
+ 8000312: d001 beq.n 8000318
+ Error_Handler();
+ 8000314: f000 fa7e bl 8000814
+ }
+ last_send_can_tick = HAL_GetTick();
+ 8000318: f000 fbd4 bl 8000ac4
+ 800031c: 4603 mov r3, r0
+ 800031e: 4a62 ldr r2, [pc, #392] @ (80004a8 )
+ 8000320: 6013 str r3, [r2, #0]
+ }
+
+ // Inverted in hardware
+ if ((HAL_GetTick() - ams_last_tick) < 80) {
+ 8000322: f000 fbcf bl 8000ac4
+ 8000326: 4602 mov r2, r0
+ 8000328: 4b61 ldr r3, [pc, #388] @ (80004b0 )
+ 800032a: 681b ldr r3, [r3, #0]
+ 800032c: 1ad3 subs r3, r2, r3
+ 800032e: 2b4f cmp r3, #79 @ 0x4f
+ 8000330: d823 bhi.n 800037a
+ HAL_GPIO_WritePin(IMD_LED_GPIO_Port, IMD_LED_Pin, dash_rx.imd_ok);
+ 8000332: 4b60 ldr r3, [pc, #384] @ (80004b4 )
+ 8000334: 685b ldr r3, [r3, #4]
+ 8000336: b2db uxtb r3, r3
+ 8000338: 461a mov r2, r3
+ 800033a: 2108 movs r1, #8
+ 800033c: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 8000340: f001 fd3e bl 8001dc0
+ HAL_GPIO_WritePin(AMS_LED_GPIO_Port, AMS_LED_Pin, dash_rx.ams_state != TS_ERROR);
+ 8000344: 4b5b ldr r3, [pc, #364] @ (80004b4 )
+ 8000346: 781b ldrb r3, [r3, #0]
+ 8000348: 2b04 cmp r3, #4
+ 800034a: bf14 ite ne
+ 800034c: 2301 movne r3, #1
+ 800034e: 2300 moveq r3, #0
+ 8000350: b2db uxtb r3, r3
+ 8000352: 461a mov r2, r3
+ 8000354: 2110 movs r1, #16
+ 8000356: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 800035a: f001 fd31 bl 8001dc0
+ HAL_GPIO_WritePin(TSOFF_LED_GPIO_Port, TSOFF_LED_Pin, dash_rx.ams_state == TS_INACTIVE);
+ 800035e: 4b55 ldr r3, [pc, #340] @ (80004b4 )
+ 8000360: 781b ldrb r3, [r3, #0]
+ 8000362: 2b00 cmp r3, #0
+ 8000364: bf0c ite eq
+ 8000366: 2301 moveq r3, #1
+ 8000368: 2300 movne r3, #0
+ 800036a: b2db uxtb r3, r3
+ 800036c: 461a mov r2, r3
+ 800036e: 2120 movs r1, #32
+ 8000370: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 8000374: f001 fd24 bl 8001dc0
+ 8000378: e011 b.n 800039e
+ } else {
+ // Safe state: Error LEDs on, TSOFF off
+ HAL_GPIO_WritePin(IMD_LED_GPIO_Port, IMD_LED_Pin, 0);
+ 800037a: 2200 movs r2, #0
+ 800037c: 2108 movs r1, #8
+ 800037e: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 8000382: f001 fd1d bl 8001dc0
+ HAL_GPIO_WritePin(AMS_LED_GPIO_Port, AMS_LED_Pin, 0);
+ 8000386: 2200 movs r2, #0
+ 8000388: 2110 movs r1, #16
+ 800038a: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 800038e: f001 fd17 bl 8001dc0
+ HAL_GPIO_WritePin(TSOFF_LED_GPIO_Port, TSOFF_LED_Pin, 0);
+ 8000392: 2200 movs r2, #0
+ 8000394: 2120 movs r1, #32
+ 8000396: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 800039a: f001 fd11 bl 8001dc0
+ }
+
+ int r = 0, g = 0, b = 0;
+ 800039e: 2300 movs r3, #0
+ 80003a0: 643b str r3, [r7, #64] @ 0x40
+ 80003a2: 2300 movs r3, #0
+ 80003a4: 63fb str r3, [r7, #60] @ 0x3c
+ 80003a6: 2300 movs r3, #0
+ 80003a8: 63bb str r3, [r7, #56] @ 0x38
+ int br = 0, bg = 0, bb = 0;
+ 80003aa: 2300 movs r3, #0
+ 80003ac: 637b str r3, [r7, #52] @ 0x34
+ 80003ae: 2300 movs r3, #0
+ 80003b0: 633b str r3, [r7, #48] @ 0x30
+ 80003b2: 2300 movs r3, #0
+ 80003b4: 62fb str r3, [r7, #44] @ 0x2c
+
+ if (dash_rx.sdc_closed) {
+ 80003b6: 4b3f ldr r3, [pc, #252] @ (80004b4 )
+ 80003b8: 689b ldr r3, [r3, #8]
+ 80003ba: 2b00 cmp r3, #0
+ 80003bc: d021 beq.n 8000402
+ switch (dash_rx.ams_state) {
+ 80003be: 4b3d ldr r3, [pc, #244] @ (80004b4 )
+ 80003c0: 781b ldrb r3, [r3, #0]
+ 80003c2: 2b03 cmp r3, #3
+ 80003c4: d81a bhi.n 80003fc
+ 80003c6: a201 add r2, pc, #4 @ (adr r2, 80003cc )
+ 80003c8: f852 f023 ldr.w pc, [r2, r3, lsl #2]
+ 80003cc: 080003dd .word 0x080003dd
+ 80003d0: 080003f1 .word 0x080003f1
+ 80003d4: 080003e7 .word 0x080003e7
+ 80003d8: 080003f7 .word 0x080003f7
+ case TS_INACTIVE:
+ r = g = 1;
+ 80003dc: 2301 movs r3, #1
+ 80003de: 63fb str r3, [r7, #60] @ 0x3c
+ 80003e0: 6bfb ldr r3, [r7, #60] @ 0x3c
+ 80003e2: 643b str r3, [r7, #64] @ 0x40
+ break;
+ 80003e4: e00f b.n 8000406
+ case TS_PRECHARGE:
+ // Gelb blink
+ br = bg = 1;
+ 80003e6: 2301 movs r3, #1
+ 80003e8: 633b str r3, [r7, #48] @ 0x30
+ 80003ea: 6b3b ldr r3, [r7, #48] @ 0x30
+ 80003ec: 637b str r3, [r7, #52] @ 0x34
+ break;
+ 80003ee: e00a b.n 8000406
+ case TS_ACTIVE:
+ g = 1;
+ 80003f0: 2301 movs r3, #1
+ 80003f2: 63fb str r3, [r7, #60] @ 0x3c
+ break;
+ 80003f4: e007 b.n 8000406
+ case TS_DISCHARGE:
+ // Blau blink
+ bb = 1;
+ 80003f6: 2301 movs r3, #1
+ 80003f8: 62fb str r3, [r7, #44] @ 0x2c
+ break;
+ 80003fa: e004 b.n 8000406
+ default:
+ r = 1;
+ 80003fc: 2301 movs r3, #1
+ 80003fe: 643b str r3, [r7, #64] @ 0x40
+ break;
+ 8000400: e001 b.n 8000406
+ }
+ } else {
+ b = 1;
+ 8000402: 2301 movs r3, #1
+ 8000404: 63bb str r3, [r7, #56] @ 0x38
+ }
+
+ HAL_GPIO_WritePin(TSON_R_GPIO_Port, TSON_R_Pin, r);
+ 8000406: 6c3b ldr r3, [r7, #64] @ 0x40
+ 8000408: b2db uxtb r3, r3
+ 800040a: 461a mov r2, r3
+ 800040c: 2101 movs r1, #1
+ 800040e: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 8000412: f001 fcd5 bl 8001dc0
+ HAL_GPIO_WritePin(TSON_G_GPIO_Port, TSON_G_Pin, g);
+ 8000416: 6bfb ldr r3, [r7, #60] @ 0x3c
+ 8000418: b2db uxtb r3, r3
+ 800041a: 461a mov r2, r3
+ 800041c: 2102 movs r1, #2
+ 800041e: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 8000422: f001 fccd bl 8001dc0
+ HAL_GPIO_WritePin(TSON_B_GPIO_Port, TSON_B_Pin, b);
+ 8000426: 6bbb ldr r3, [r7, #56] @ 0x38
+ 8000428: b2db uxtb r3, r3
+ 800042a: 461a mov r2, r3
+ 800042c: 2104 movs r1, #4
+ 800042e: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 8000432: f001 fcc5 bl 8001dc0
+
+ if (br || bg || bb) {
+ 8000436: 6b7b ldr r3, [r7, #52] @ 0x34
+ 8000438: 2b00 cmp r3, #0
+ 800043a: d105 bne.n 8000448
+ 800043c: 6b3b ldr r3, [r7, #48] @ 0x30
+ 800043e: 2b00 cmp r3, #0
+ 8000440: d102 bne.n 8000448
+ 8000442: 6afb ldr r3, [r7, #44] @ 0x2c
+ 8000444: 2b00 cmp r3, #0
+ 8000446: d03f beq.n 80004c8
+ HAL_GPIO_WritePin(TSON_R_GPIO_Port, TSON_R_Pin, br && blink_state);
+ 8000448: 6b7b ldr r3, [r7, #52] @ 0x34
+ 800044a: 2b00 cmp r3, #0
+ 800044c: d004 beq.n 8000458
+ 800044e: 6c7b ldr r3, [r7, #68] @ 0x44
+ 8000450: 2b00 cmp r3, #0
+ 8000452: d001 beq.n 8000458
+ 8000454: 2301 movs r3, #1
+ 8000456: e000 b.n 800045a
+ 8000458: 2300 movs r3, #0
+ 800045a: b2db uxtb r3, r3
+ 800045c: 461a mov r2, r3
+ 800045e: 2101 movs r1, #1
+ 8000460: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 8000464: f001 fcac bl 8001dc0
+ HAL_GPIO_WritePin(TSON_G_GPIO_Port, TSON_G_Pin, bg && blink_state);
+ 8000468: 6b3b ldr r3, [r7, #48] @ 0x30
+ 800046a: 2b00 cmp r3, #0
+ 800046c: d004 beq.n 8000478
+ 800046e: 6c7b ldr r3, [r7, #68] @ 0x44
+ 8000470: 2b00 cmp r3, #0
+ 8000472: d001 beq.n 8000478
+ 8000474: 2301 movs r3, #1
+ 8000476: e000 b.n 800047a
+ 8000478: 2300 movs r3, #0
+ 800047a: b2db uxtb r3, r3
+ 800047c: 461a mov r2, r3
+ 800047e: 2102 movs r1, #2
+ 8000480: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 8000484: f001 fc9c bl 8001dc0
+ HAL_GPIO_WritePin(TSON_B_GPIO_Port, TSON_B_Pin, bb && blink_state);
+ 8000488: 6afb ldr r3, [r7, #44] @ 0x2c
+ 800048a: 2b00 cmp r3, #0
+ 800048c: d014 beq.n 80004b8
+ 800048e: 6c7b ldr r3, [r7, #68] @ 0x44
+ 8000490: 2b00 cmp r3, #0
+ 8000492: d011 beq.n 80004b8
+ 8000494: 2301 movs r3, #1
+ 8000496: e010 b.n 80004ba
+ 8000498: 20000090 .word 0x20000090
+ 800049c: 20000028 .word 0x20000028
+ 80004a0: 48000400 .word 0x48000400
+ 80004a4: 2000008c .word 0x2000008c
+ 80004a8: 200000c0 .word 0x200000c0
+ 80004ac: 200000a8 .word 0x200000a8
+ 80004b0: 200000bc .word 0x200000bc
+ 80004b4: 200000ac .word 0x200000ac
+ 80004b8: 2300 movs r3, #0
+ 80004ba: b2db uxtb r3, r3
+ 80004bc: 461a mov r2, r3
+ 80004be: 2104 movs r1, #4
+ 80004c0: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 80004c4: f001 fc7c bl 8001dc0
+ }
+
+ r = g = b = 0;
+ 80004c8: 2300 movs r3, #0
+ 80004ca: 63bb str r3, [r7, #56] @ 0x38
+ 80004cc: 6bbb ldr r3, [r7, #56] @ 0x38
+ 80004ce: 63fb str r3, [r7, #60] @ 0x3c
+ 80004d0: 6bfb ldr r3, [r7, #60] @ 0x3c
+ 80004d2: 643b str r3, [r7, #64] @ 0x40
+ br = bg = bb = 0;
+ 80004d4: 2300 movs r3, #0
+ 80004d6: 62fb str r3, [r7, #44] @ 0x2c
+ 80004d8: 6afb ldr r3, [r7, #44] @ 0x2c
+ 80004da: 633b str r3, [r7, #48] @ 0x30
+ 80004dc: 6b3b ldr r3, [r7, #48] @ 0x30
+ 80004de: 637b str r3, [r7, #52] @ 0x34
+
+ if (dash_rx.ams_state == TS_ACTIVE) {
+ 80004e0: 4b3a ldr r3, [pc, #232] @ (80005cc )
+ 80004e2: 781b ldrb r3, [r3, #0]
+ 80004e4: 2b01 cmp r3, #1
+ 80004e6: d116 bne.n 8000516
+ switch (dash_rx.r2d_progress) {
+ 80004e8: 4b38 ldr r3, [pc, #224] @ (80005cc )
+ 80004ea: 7b1b ldrb r3, [r3, #12]
+ 80004ec: 2b02 cmp r3, #2
+ 80004ee: dc02 bgt.n 80004f6
+ 80004f0: 2b00 cmp r3, #0
+ 80004f2: da03 bge.n 80004fc
+ 80004f4: e00a b.n 800050c
+ 80004f6: 2b0f cmp r3, #15
+ 80004f8: d005 beq.n 8000506
+ 80004fa: e007 b.n 800050c
+ case R2D_NONE:
+ case R2D_TSMS:
+ case R2D_TSActive:
+ r = g = 1;
+ 80004fc: 2301 movs r3, #1
+ 80004fe: 63fb str r3, [r7, #60] @ 0x3c
+ 8000500: 6bfb ldr r3, [r7, #60] @ 0x3c
+ 8000502: 643b str r3, [r7, #64] @ 0x40
+ break;
+ 8000504: e009 b.n 800051a
+ case R2D_Success:
+ g = 1;
+ 8000506: 2301 movs r3, #1
+ 8000508: 63fb str r3, [r7, #60] @ 0x3c
+ break;
+ 800050a: e006 b.n 800051a
+ default:
+ // Gelb blink
+ bg = br = 1;
+ 800050c: 2301 movs r3, #1
+ 800050e: 637b str r3, [r7, #52] @ 0x34
+ 8000510: 6b7b ldr r3, [r7, #52] @ 0x34
+ 8000512: 633b str r3, [r7, #48] @ 0x30
+ break;
+ 8000514: e001 b.n 800051a
+ }
+ } else {
+ b = 1;
+ 8000516: 2301 movs r3, #1
+ 8000518: 63bb str r3, [r7, #56] @ 0x38
+ }
+
+ HAL_GPIO_WritePin(R2D_R_GPIO_Port, R2D_R_Pin, r);
+ 800051a: 6c3b ldr r3, [r7, #64] @ 0x40
+ 800051c: b2db uxtb r3, r3
+ 800051e: 461a mov r2, r3
+ 8000520: 2180 movs r1, #128 @ 0x80
+ 8000522: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 8000526: f001 fc4b bl 8001dc0
+ HAL_GPIO_WritePin(R2D_G_GPIO_Port, R2D_G_Pin, g);
+ 800052a: 6bfb ldr r3, [r7, #60] @ 0x3c
+ 800052c: b2db uxtb r3, r3
+ 800052e: 461a mov r2, r3
+ 8000530: 2101 movs r1, #1
+ 8000532: 4827 ldr r0, [pc, #156] @ (80005d0 )
+ 8000534: f001 fc44 bl 8001dc0
+ HAL_GPIO_WritePin(R2D_B_GPIO_Port, R2D_B_Pin, b);
+ 8000538: 6bbb ldr r3, [r7, #56] @ 0x38
+ 800053a: b2db uxtb r3, r3
+ 800053c: 461a mov r2, r3
+ 800053e: 2102 movs r1, #2
+ 8000540: 4823 ldr r0, [pc, #140] @ (80005d0 )
+ 8000542: f001 fc3d bl 8001dc0
+
+
+ if (br || bg || bb) {
+ 8000546: 6b7b ldr r3, [r7, #52] @ 0x34
+ 8000548: 2b00 cmp r3, #0
+ 800054a: d105 bne.n 8000558
+ 800054c: 6b3b ldr r3, [r7, #48] @ 0x30
+ 800054e: 2b00 cmp r3, #0
+ 8000550: d102 bne.n 8000558
+ 8000552: 6afb ldr r3, [r7, #44] @ 0x2c
+ 8000554: 2b00 cmp r3, #0
+ 8000556: d02d beq.n 80005b4
+ HAL_GPIO_WritePin(R2D_R_GPIO_Port, R2D_R_Pin, br && blink_state);
+ 8000558: 6b7b ldr r3, [r7, #52] @ 0x34
+ 800055a: 2b00 cmp r3, #0
+ 800055c: d004 beq.n 8000568
+ 800055e: 6c7b ldr r3, [r7, #68] @ 0x44
+ 8000560: 2b00 cmp r3, #0
+ 8000562: d001 beq.n 8000568
+ 8000564: 2301 movs r3, #1
+ 8000566: e000 b.n 800056a
+ 8000568: 2300 movs r3, #0
+ 800056a: b2db uxtb r3, r3
+ 800056c: 461a mov r2, r3
+ 800056e: 2180 movs r1, #128 @ 0x80
+ 8000570: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 8000574: f001 fc24 bl 8001dc0
+ HAL_GPIO_WritePin(R2D_G_GPIO_Port, R2D_G_Pin, bg && blink_state);
+ 8000578: 6b3b ldr r3, [r7, #48] @ 0x30
+ 800057a: 2b00 cmp r3, #0
+ 800057c: d004 beq.n 8000588
+ 800057e: 6c7b ldr r3, [r7, #68] @ 0x44
+ 8000580: 2b00 cmp r3, #0
+ 8000582: d001 beq.n 8000588
+ 8000584: 2301 movs r3, #1
+ 8000586: e000 b.n 800058a
+ 8000588: 2300 movs r3, #0
+ 800058a: b2db uxtb r3, r3
+ 800058c: 461a mov r2, r3
+ 800058e: 2101 movs r1, #1
+ 8000590: 480f ldr r0, [pc, #60] @ (80005d0 )
+ 8000592: f001 fc15 bl 8001dc0
+ HAL_GPIO_WritePin(R2D_B_GPIO_Port, R2D_B_Pin, bb && blink_state);
+ 8000596: 6afb ldr r3, [r7, #44] @ 0x2c
+ 8000598: 2b00 cmp r3, #0
+ 800059a: d004 beq.n 80005a6
+ 800059c: 6c7b ldr r3, [r7, #68] @ 0x44
+ 800059e: 2b00 cmp r3, #0
+ 80005a0: d001 beq.n 80005a6
+ 80005a2: 2301 movs r3, #1
+ 80005a4: e000 b.n 80005a8
+ 80005a6: 2300 movs r3, #0
+ 80005a8: b2db uxtb r3, r3
+ 80005aa: 461a mov r2, r3
+ 80005ac: 2102 movs r1, #2
+ 80005ae: 4808 ldr r0, [pc, #32] @ (80005d0 )
+ 80005b0: f001 fc06 bl 8001dc0
+ }
+
+ blink_state = !blink_state;
+ 80005b4: 6c7b ldr r3, [r7, #68] @ 0x44
+ 80005b6: 2b00 cmp r3, #0
+ 80005b8: bf0c ite eq
+ 80005ba: 2301 moveq r3, #1
+ 80005bc: 2300 movne r3, #0
+ 80005be: b2db uxtb r3, r3
+ 80005c0: 647b str r3, [r7, #68] @ 0x44
+
+ HAL_Delay(50);
+ 80005c2: 2032 movs r0, #50 @ 0x32
+ 80005c4: f000 fa8a bl 8000adc
+ {
+ 80005c8: e64b b.n 8000262
+ 80005ca: bf00 nop
+ 80005cc: 200000ac .word 0x200000ac
+ 80005d0: 48000400 .word 0x48000400
+
+080005d4 :
+/**
+ * @brief System Clock Configuration
+ * @retval None
+ */
+void SystemClock_Config(void)
+{
+ 80005d4: b580 push {r7, lr}
+ 80005d6: b090 sub sp, #64 @ 0x40
+ 80005d8: af00 add r7, sp, #0
+ RCC_OscInitTypeDef RCC_OscInitStruct = {0};
+ 80005da: f107 0318 add.w r3, r7, #24
+ 80005de: 2228 movs r2, #40 @ 0x28
+ 80005e0: 2100 movs r1, #0
+ 80005e2: 4618 mov r0, r3
+ 80005e4: f002 fe12 bl 800320c
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
+ 80005e8: 1d3b adds r3, r7, #4
+ 80005ea: 2200 movs r2, #0
+ 80005ec: 601a str r2, [r3, #0]
+ 80005ee: 605a str r2, [r3, #4]
+ 80005f0: 609a str r2, [r3, #8]
+ 80005f2: 60da str r2, [r3, #12]
+ 80005f4: 611a str r2, [r3, #16]
+
+ /** Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
+ 80005f6: 2302 movs r3, #2
+ 80005f8: 61bb str r3, [r7, #24]
+ RCC_OscInitStruct.HSIState = RCC_HSI_ON;
+ 80005fa: 2301 movs r3, #1
+ 80005fc: 62bb str r3, [r7, #40] @ 0x28
+ RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
+ 80005fe: 2310 movs r3, #16
+ 8000600: 62fb str r3, [r7, #44] @ 0x2c
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
+ 8000602: 2302 movs r3, #2
+ 8000604: 637b str r3, [r7, #52] @ 0x34
+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
+ 8000606: 2300 movs r3, #0
+ 8000608: 63bb str r3, [r7, #56] @ 0x38
+ RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL4;
+ 800060a: f44f 2300 mov.w r3, #524288 @ 0x80000
+ 800060e: 63fb str r3, [r7, #60] @ 0x3c
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
+ 8000610: f107 0318 add.w r3, r7, #24
+ 8000614: 4618 mov r0, r3
+ 8000616: f001 fbeb bl 8001df0
+ 800061a: 4603 mov r3, r0
+ 800061c: 2b00 cmp r3, #0
+ 800061e: d001 beq.n 8000624
+ {
+ Error_Handler();
+ 8000620: f000 f8f8 bl 8000814
+ }
+
+ /** Initializes the CPU, AHB and APB buses clocks
+ */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
+ 8000624: 230f movs r3, #15
+ 8000626: 607b str r3, [r7, #4]
+ |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
+ 8000628: 2302 movs r3, #2
+ 800062a: 60bb str r3, [r7, #8]
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ 800062c: 2300 movs r3, #0
+ 800062e: 60fb str r3, [r7, #12]
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+ 8000630: 2300 movs r3, #0
+ 8000632: 613b str r3, [r7, #16]
+ RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
+ 8000634: 2300 movs r3, #0
+ 8000636: 617b str r3, [r7, #20]
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
+ 8000638: 1d3b adds r3, r7, #4
+ 800063a: 2100 movs r1, #0
+ 800063c: 4618 mov r0, r3
+ 800063e: f002 fc15 bl 8002e6c
+ 8000642: 4603 mov r3, r0
+ 8000644: 2b00 cmp r3, #0
+ 8000646: d001 beq.n 800064c
+ {
+ Error_Handler();
+ 8000648: f000 f8e4 bl 8000814
+ }
+}
+ 800064c: bf00 nop
+ 800064e: 3740 adds r7, #64 @ 0x40
+ 8000650: 46bd mov sp, r7
+ 8000652: bd80 pop {r7, pc}
+
+08000654 :
+ * @brief CAN Initialization Function
+ * @param None
+ * @retval None
+ */
+static void MX_CAN_Init(void)
+{
+ 8000654: b580 push {r7, lr}
+ 8000656: af00 add r7, sp, #0
+ /* USER CODE END CAN_Init 0 */
+
+ /* USER CODE BEGIN CAN_Init 1 */
+
+ /* USER CODE END CAN_Init 1 */
+ hcan.Instance = CAN;
+ 8000658: 4b17 ldr r3, [pc, #92] @ (80006b8 )
+ 800065a: 4a18 ldr r2, [pc, #96] @ (80006bc )
+ 800065c: 601a str r2, [r3, #0]
+ hcan.Init.Prescaler = 2;
+ 800065e: 4b16 ldr r3, [pc, #88] @ (80006b8 )
+ 8000660: 2202 movs r2, #2
+ 8000662: 605a str r2, [r3, #4]
+ hcan.Init.Mode = CAN_MODE_NORMAL;
+ 8000664: 4b14 ldr r3, [pc, #80] @ (80006b8 )
+ 8000666: 2200 movs r2, #0
+ 8000668: 609a str r2, [r3, #8]
+ hcan.Init.SyncJumpWidth = CAN_SJW_1TQ;
+ 800066a: 4b13 ldr r3, [pc, #76] @ (80006b8 )
+ 800066c: 2200 movs r2, #0
+ 800066e: 60da str r2, [r3, #12]
+ hcan.Init.TimeSeg1 = CAN_BS1_13TQ;
+ 8000670: 4b11 ldr r3, [pc, #68] @ (80006b8 )
+ 8000672: f44f 2240 mov.w r2, #786432 @ 0xc0000
+ 8000676: 611a str r2, [r3, #16]
+ hcan.Init.TimeSeg2 = CAN_BS2_2TQ;
+ 8000678: 4b0f ldr r3, [pc, #60] @ (80006b8 )
+ 800067a: f44f 1280 mov.w r2, #1048576 @ 0x100000
+ 800067e: 615a str r2, [r3, #20]
+ hcan.Init.TimeTriggeredMode = DISABLE;
+ 8000680: 4b0d ldr r3, [pc, #52] @ (80006b8 )
+ 8000682: 2200 movs r2, #0
+ 8000684: 761a strb r2, [r3, #24]
+ hcan.Init.AutoBusOff = DISABLE;
+ 8000686: 4b0c ldr r3, [pc, #48] @ (80006b8 )
+ 8000688: 2200 movs r2, #0
+ 800068a: 765a strb r2, [r3, #25]
+ hcan.Init.AutoWakeUp = DISABLE;
+ 800068c: 4b0a ldr r3, [pc, #40] @ (80006b8 )
+ 800068e: 2200 movs r2, #0
+ 8000690: 769a strb r2, [r3, #26]
+ hcan.Init.AutoRetransmission = DISABLE;
+ 8000692: 4b09 ldr r3, [pc, #36] @ (80006b8 )
+ 8000694: 2200 movs r2, #0
+ 8000696: 76da strb r2, [r3, #27]
+ hcan.Init.ReceiveFifoLocked = DISABLE;
+ 8000698: 4b07 ldr r3, [pc, #28] @ (80006b8 )
+ 800069a: 2200 movs r2, #0
+ 800069c: 771a strb r2, [r3, #28]
+ hcan.Init.TransmitFifoPriority = DISABLE;
+ 800069e: 4b06 ldr r3, [pc, #24] @ (80006b8 )
+ 80006a0: 2200 movs r2, #0
+ 80006a2: 775a strb r2, [r3, #29]
+ if (HAL_CAN_Init(&hcan) != HAL_OK)
+ 80006a4: 4804 ldr r0, [pc, #16] @ (80006b8 )
+ 80006a6: f000 fa3d bl 8000b24
+ 80006aa: 4603 mov r3, r0
+ 80006ac: 2b00 cmp r3, #0
+ 80006ae: d001 beq.n 80006b4
+ {
+ Error_Handler();
+ 80006b0: f000 f8b0 bl 8000814
+ }
+ /* USER CODE BEGIN CAN_Init 2 */
+
+ /* USER CODE END CAN_Init 2 */
+
+}
+ 80006b4: bf00 nop
+ 80006b6: bd80 pop {r7, pc}
+ 80006b8: 20000028 .word 0x20000028
+ 80006bc: 40006400 .word 0x40006400
+
+080006c0 :
+ * @brief GPIO Initialization Function
+ * @param None
+ * @retval None
+ */
+static void MX_GPIO_Init(void)
+{
+ 80006c0: b580 push {r7, lr}
+ 80006c2: b088 sub sp, #32
+ 80006c4: af00 add r7, sp, #0
+ GPIO_InitTypeDef GPIO_InitStruct = {0};
+ 80006c6: f107 030c add.w r3, r7, #12
+ 80006ca: 2200 movs r2, #0
+ 80006cc: 601a str r2, [r3, #0]
+ 80006ce: 605a str r2, [r3, #4]
+ 80006d0: 609a str r2, [r3, #8]
+ 80006d2: 60da str r2, [r3, #12]
+ 80006d4: 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_GPIOA_CLK_ENABLE();
+ 80006d6: 4b28 ldr r3, [pc, #160] @ (8000778 )
+ 80006d8: 695b ldr r3, [r3, #20]
+ 80006da: 4a27 ldr r2, [pc, #156] @ (8000778 )
+ 80006dc: f443 3300 orr.w r3, r3, #131072 @ 0x20000
+ 80006e0: 6153 str r3, [r2, #20]
+ 80006e2: 4b25 ldr r3, [pc, #148] @ (8000778 )
+ 80006e4: 695b ldr r3, [r3, #20]
+ 80006e6: f403 3300 and.w r3, r3, #131072 @ 0x20000
+ 80006ea: 60bb str r3, [r7, #8]
+ 80006ec: 68bb ldr r3, [r7, #8]
+ __HAL_RCC_GPIOB_CLK_ENABLE();
+ 80006ee: 4b22 ldr r3, [pc, #136] @ (8000778 )
+ 80006f0: 695b ldr r3, [r3, #20]
+ 80006f2: 4a21 ldr r2, [pc, #132] @ (8000778 )
+ 80006f4: f443 2380 orr.w r3, r3, #262144 @ 0x40000
+ 80006f8: 6153 str r3, [r2, #20]
+ 80006fa: 4b1f ldr r3, [pc, #124] @ (8000778 )
+ 80006fc: 695b ldr r3, [r3, #20]
+ 80006fe: f403 2380 and.w r3, r3, #262144 @ 0x40000
+ 8000702: 607b str r3, [r7, #4]
+ 8000704: 687b ldr r3, [r7, #4]
+
+ /*Configure GPIO pin Output Level */
+ HAL_GPIO_WritePin(GPIOA, TSON_R_Pin|TSON_G_Pin|TSON_B_Pin|IMD_LED_Pin
+ 8000706: 2200 movs r2, #0
+ 8000708: 21bf movs r1, #191 @ 0xbf
+ 800070a: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 800070e: f001 fb57 bl 8001dc0
+ |AMS_LED_Pin|TSOFF_LED_Pin|R2D_R_Pin, GPIO_PIN_RESET);
+
+ /*Configure GPIO pin Output Level */
+ HAL_GPIO_WritePin(GPIOB, R2D_G_Pin|R2D_B_Pin, GPIO_PIN_RESET);
+ 8000712: 2200 movs r2, #0
+ 8000714: 2103 movs r1, #3
+ 8000716: 4819 ldr r0, [pc, #100] @ (800077c )
+ 8000718: f001 fb52 bl 8001dc0
+
+ /*Configure GPIO pins : TSON_R_Pin TSON_G_Pin TSON_B_Pin IMD_LED_Pin
+ AMS_LED_Pin TSOFF_LED_Pin R2D_R_Pin */
+ GPIO_InitStruct.Pin = TSON_R_Pin|TSON_G_Pin|TSON_B_Pin|IMD_LED_Pin
+ 800071c: 23bf movs r3, #191 @ 0xbf
+ 800071e: 60fb str r3, [r7, #12]
+ |AMS_LED_Pin|TSOFF_LED_Pin|R2D_R_Pin;
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+ 8000720: 2301 movs r3, #1
+ 8000722: 613b str r3, [r7, #16]
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ 8000724: 2300 movs r3, #0
+ 8000726: 617b str r3, [r7, #20]
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
+ 8000728: 2300 movs r3, #0
+ 800072a: 61bb str r3, [r7, #24]
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+ 800072c: f107 030c add.w r3, r7, #12
+ 8000730: 4619 mov r1, r3
+ 8000732: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 8000736: f001 f9b1 bl 8001a9c
+
+ /*Configure GPIO pins : R2D_G_Pin R2D_B_Pin */
+ GPIO_InitStruct.Pin = R2D_G_Pin|R2D_B_Pin;
+ 800073a: 2303 movs r3, #3
+ 800073c: 60fb str r3, [r7, #12]
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+ 800073e: 2301 movs r3, #1
+ 8000740: 613b str r3, [r7, #16]
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ 8000742: 2300 movs r3, #0
+ 8000744: 617b str r3, [r7, #20]
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
+ 8000746: 2300 movs r3, #0
+ 8000748: 61bb str r3, [r7, #24]
+ HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
+ 800074a: f107 030c add.w r3, r7, #12
+ 800074e: 4619 mov r1, r3
+ 8000750: 480a ldr r0, [pc, #40] @ (800077c )
+ 8000752: f001 f9a3 bl 8001a9c
+
+ /*Configure GPIO pins : TSON_BTN_Pin SDC_Out_3V3_Pin SDC_In_3V3_Pin R2D_BTN_Pin
+ RMode_Out_3V3_Pin */
+ GPIO_InitStruct.Pin = TSON_BTN_Pin|SDC_Out_3V3_Pin|SDC_In_3V3_Pin|R2D_BTN_Pin
+ 8000756: f248 1338 movw r3, #33080 @ 0x8138
+ 800075a: 60fb str r3, [r7, #12]
+ |RMode_Out_3V3_Pin;
+ GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
+ 800075c: 2300 movs r3, #0
+ 800075e: 613b str r3, [r7, #16]
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ 8000760: 2300 movs r3, #0
+ 8000762: 617b str r3, [r7, #20]
+ HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
+ 8000764: f107 030c add.w r3, r7, #12
+ 8000768: 4619 mov r1, r3
+ 800076a: 4804 ldr r0, [pc, #16] @ (800077c )
+ 800076c: f001 f996 bl 8001a9c
+
+/* USER CODE BEGIN MX_GPIO_Init_2 */
+/* USER CODE END MX_GPIO_Init_2 */
+}
+ 8000770: bf00 nop
+ 8000772: 3720 adds r7, #32
+ 8000774: 46bd mov sp, r7
+ 8000776: bd80 pop {r7, pc}
+ 8000778: 40021000 .word 0x40021000
+ 800077c: 48000400 .word 0x48000400
+
+08000780 :
+
+/* USER CODE BEGIN 4 */
+// CAN RX interrupt handler
+void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan) {
+ 8000780: b580 push {r7, lr}
+ 8000782: b08c sub sp, #48 @ 0x30
+ 8000784: af00 add r7, sp, #0
+ 8000786: 6078 str r0, [r7, #4]
+
+ CAN_RxHeaderTypeDef rxHeader;
+ uint8_t rxData[8];
+
+ // Read frame from HW into buffer
+ if (HAL_CAN_GetRxMessage(hcan, CAN_RX_FIFO0, &rxHeader, rxData) != HAL_OK)
+ 8000788: f107 0308 add.w r3, r7, #8
+ 800078c: f107 0210 add.w r2, r7, #16
+ 8000790: 2100 movs r1, #0
+ 8000792: 6878 ldr r0, [r7, #4]
+ 8000794: f000 fcea bl 800116c
+ 8000798: 4603 mov r3, r0
+ 800079a: 2b00 cmp r3, #0
+ 800079c: d001 beq.n 80007a2
+ Error_Handler();
+ 800079e: f000 f839 bl 8000814
+
+ // Discard if it's not for us (shouldn't happen thanks to filter, but just to be sure)
+ if (rxHeader.StdId == CAN_ID_RX_AMS) {
+ 80007a2: 693b ldr r3, [r7, #16]
+ 80007a4: 2b0a cmp r3, #10
+ 80007a6: d11f bne.n 80007e8
+ uint8_t ams_info = rxData[0];
+ 80007a8: 7a3b ldrb r3, [r7, #8]
+ 80007aa: f887 302f strb.w r3, [r7, #47] @ 0x2f
+ uint8_t imd_info = rxData[6];
+ 80007ae: 7bbb ldrb r3, [r7, #14]
+ 80007b0: f887 302e strb.w r3, [r7, #46] @ 0x2e
+
+ dash_rx.ams_state = ams_info & 0b01111111;
+ 80007b4: f897 302f ldrb.w r3, [r7, #47] @ 0x2f
+ 80007b8: f003 037f and.w r3, r3, #127 @ 0x7f
+ 80007bc: b2da uxtb r2, r3
+ 80007be: 4b13 ldr r3, [pc, #76] @ (800080c )
+ 80007c0: 701a strb r2, [r3, #0]
+ dash_rx.sdc_closed = ams_info >> 7;
+ 80007c2: f897 302f ldrb.w r3, [r7, #47] @ 0x2f
+ 80007c6: 09db lsrs r3, r3, #7
+ 80007c8: b2db uxtb r3, r3
+ 80007ca: 461a mov r2, r3
+ 80007cc: 4b0f ldr r3, [pc, #60] @ (800080c )
+ 80007ce: 609a str r2, [r3, #8]
+ dash_rx.imd_ok = imd_info >> 7;
+ 80007d0: f897 302e ldrb.w r3, [r7, #46] @ 0x2e
+ 80007d4: 09db lsrs r3, r3, #7
+ 80007d6: b2db uxtb r3, r3
+ 80007d8: 461a mov r2, r3
+ 80007da: 4b0c ldr r3, [pc, #48] @ (800080c )
+ 80007dc: 605a str r2, [r3, #4]
+ ams_last_tick = HAL_GetTick();
+ 80007de: f000 f971 bl 8000ac4
+ 80007e2: 4603 mov r3, r0
+ 80007e4: 4a0a ldr r2, [pc, #40] @ (8000810 )
+ 80007e6: 6013 str r3, [r2, #0]
+ }
+
+
+ if (rxHeader.StdId == CAN_ID_RX_R2D) {
+ 80007e8: 693b ldr r3, [r7, #16]
+ 80007ea: f5b3 6f82 cmp.w r3, #1040 @ 0x410
+ 80007ee: d109 bne.n 8000804
+ uint8_t r2d_info = rxData[1];
+ 80007f0: 7a7b ldrb r3, [r7, #9]
+ 80007f2: f887 302d strb.w r3, [r7, #45] @ 0x2d
+
+ dash_rx.r2d_progress = r2d_info & 0b00001111;
+ 80007f6: f897 302d ldrb.w r3, [r7, #45] @ 0x2d
+ 80007fa: f003 030f and.w r3, r3, #15
+ 80007fe: b2da uxtb r2, r3
+ 8000800: 4b02 ldr r3, [pc, #8] @ (800080c )
+ 8000802: 731a strb r2, [r3, #12]
+ }
+
+
+}
+ 8000804: bf00 nop
+ 8000806: 3730 adds r7, #48 @ 0x30
+ 8000808: 46bd mov sp, r7
+ 800080a: bd80 pop {r7, pc}
+ 800080c: 200000ac .word 0x200000ac
+ 8000810: 200000bc .word 0x200000bc
+
+08000814 :
+/**
+ * @brief This function is executed in case of error occurrence.
+ * @retval None
+ */
+void Error_Handler(void)
+{
+ 8000814: b480 push {r7}
+ 8000816: af00 add r7, sp, #0
+ \details Disables IRQ interrupts by setting the I-bit in the CPSR.
+ Can only be executed in Privileged modes.
+ */
+__STATIC_FORCEINLINE void __disable_irq(void)
+{
+ __ASM volatile ("cpsid i" : : : "memory");
+ 8000818: b672 cpsid i
+}
+ 800081a: 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)
+ 800081c: bf00 nop
+ 800081e: e7fd b.n 800081c
+
+08000820 :
+/* USER CODE END 0 */
+/**
+ * Initializes the Global MSP.
+ */
+void HAL_MspInit(void)
+{
+ 8000820: b480 push {r7}
+ 8000822: b083 sub sp, #12
+ 8000824: af00 add r7, sp, #0
+
+ /* USER CODE BEGIN MspInit 0 */
+
+ /* USER CODE END MspInit 0 */
+
+ __HAL_RCC_SYSCFG_CLK_ENABLE();
+ 8000826: 4b0f ldr r3, [pc, #60] @ (8000864 )
+ 8000828: 699b ldr r3, [r3, #24]
+ 800082a: 4a0e ldr r2, [pc, #56] @ (8000864 )
+ 800082c: f043 0301 orr.w r3, r3, #1
+ 8000830: 6193 str r3, [r2, #24]
+ 8000832: 4b0c ldr r3, [pc, #48] @ (8000864 )
+ 8000834: 699b ldr r3, [r3, #24]
+ 8000836: f003 0301 and.w r3, r3, #1
+ 800083a: 607b str r3, [r7, #4]
+ 800083c: 687b ldr r3, [r7, #4]
+ __HAL_RCC_PWR_CLK_ENABLE();
+ 800083e: 4b09 ldr r3, [pc, #36] @ (8000864 )
+ 8000840: 69db ldr r3, [r3, #28]
+ 8000842: 4a08 ldr r2, [pc, #32] @ (8000864 )
+ 8000844: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000
+ 8000848: 61d3 str r3, [r2, #28]
+ 800084a: 4b06 ldr r3, [pc, #24] @ (8000864 )
+ 800084c: 69db ldr r3, [r3, #28]
+ 800084e: f003 5380 and.w r3, r3, #268435456 @ 0x10000000
+ 8000852: 603b str r3, [r7, #0]
+ 8000854: 683b ldr r3, [r7, #0]
+ /* System interrupt init*/
+
+ /* USER CODE BEGIN MspInit 1 */
+
+ /* USER CODE END MspInit 1 */
+}
+ 8000856: bf00 nop
+ 8000858: 370c adds r7, #12
+ 800085a: 46bd mov sp, r7
+ 800085c: f85d 7b04 ldr.w r7, [sp], #4
+ 8000860: 4770 bx lr
+ 8000862: bf00 nop
+ 8000864: 40021000 .word 0x40021000
+
+08000868 :
+* This function configures the hardware resources used in this example
+* @param hcan: CAN handle pointer
+* @retval None
+*/
+void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan)
+{
+ 8000868: b580 push {r7, lr}
+ 800086a: b08a sub sp, #40 @ 0x28
+ 800086c: af00 add r7, sp, #0
+ 800086e: 6078 str r0, [r7, #4]
+ GPIO_InitTypeDef GPIO_InitStruct = {0};
+ 8000870: f107 0314 add.w r3, r7, #20
+ 8000874: 2200 movs r2, #0
+ 8000876: 601a str r2, [r3, #0]
+ 8000878: 605a str r2, [r3, #4]
+ 800087a: 609a str r2, [r3, #8]
+ 800087c: 60da str r2, [r3, #12]
+ 800087e: 611a str r2, [r3, #16]
+ if(hcan->Instance==CAN)
+ 8000880: 687b ldr r3, [r7, #4]
+ 8000882: 681b ldr r3, [r3, #0]
+ 8000884: 4a20 ldr r2, [pc, #128] @ (8000908 )
+ 8000886: 4293 cmp r3, r2
+ 8000888: d139 bne.n 80008fe
+ {
+ /* USER CODE BEGIN CAN_MspInit 0 */
+
+ /* USER CODE END CAN_MspInit 0 */
+ /* Peripheral clock enable */
+ __HAL_RCC_CAN1_CLK_ENABLE();
+ 800088a: 4b20 ldr r3, [pc, #128] @ (800090c )
+ 800088c: 69db ldr r3, [r3, #28]
+ 800088e: 4a1f ldr r2, [pc, #124] @ (800090c )
+ 8000890: f043 7300 orr.w r3, r3, #33554432 @ 0x2000000
+ 8000894: 61d3 str r3, [r2, #28]
+ 8000896: 4b1d ldr r3, [pc, #116] @ (800090c )
+ 8000898: 69db ldr r3, [r3, #28]
+ 800089a: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
+ 800089e: 613b str r3, [r7, #16]
+ 80008a0: 693b ldr r3, [r7, #16]
+
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+ 80008a2: 4b1a ldr r3, [pc, #104] @ (800090c )
+ 80008a4: 695b ldr r3, [r3, #20]
+ 80008a6: 4a19 ldr r2, [pc, #100] @ (800090c )
+ 80008a8: f443 3300 orr.w r3, r3, #131072 @ 0x20000
+ 80008ac: 6153 str r3, [r2, #20]
+ 80008ae: 4b17 ldr r3, [pc, #92] @ (800090c )
+ 80008b0: 695b ldr r3, [r3, #20]
+ 80008b2: f403 3300 and.w r3, r3, #131072 @ 0x20000
+ 80008b6: 60fb str r3, [r7, #12]
+ 80008b8: 68fb ldr r3, [r7, #12]
+ /**CAN GPIO Configuration
+ PA11 ------> CAN_RX
+ PA12 ------> CAN_TX
+ */
+ GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12;
+ 80008ba: f44f 53c0 mov.w r3, #6144 @ 0x1800
+ 80008be: 617b str r3, [r7, #20]
+ GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
+ 80008c0: 2302 movs r3, #2
+ 80008c2: 61bb str r3, [r7, #24]
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ 80008c4: 2300 movs r3, #0
+ 80008c6: 61fb str r3, [r7, #28]
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
+ 80008c8: 2303 movs r3, #3
+ 80008ca: 623b str r3, [r7, #32]
+ GPIO_InitStruct.Alternate = GPIO_AF9_CAN;
+ 80008cc: 2309 movs r3, #9
+ 80008ce: 627b str r3, [r7, #36] @ 0x24
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+ 80008d0: f107 0314 add.w r3, r7, #20
+ 80008d4: 4619 mov r1, r3
+ 80008d6: f04f 4090 mov.w r0, #1207959552 @ 0x48000000
+ 80008da: f001 f8df bl 8001a9c
+
+ /* CAN interrupt Init */
+ HAL_NVIC_SetPriority(USB_LP_CAN_RX0_IRQn, 0, 0);
+ 80008de: 2200 movs r2, #0
+ 80008e0: 2100 movs r1, #0
+ 80008e2: 2014 movs r0, #20
+ 80008e4: f001 f8a3 bl 8001a2e
+ HAL_NVIC_EnableIRQ(USB_LP_CAN_RX0_IRQn);
+ 80008e8: 2014 movs r0, #20
+ 80008ea: f001 f8bc bl 8001a66
+ HAL_NVIC_SetPriority(CAN_RX1_IRQn, 0, 0);
+ 80008ee: 2200 movs r2, #0
+ 80008f0: 2100 movs r1, #0
+ 80008f2: 2015 movs r0, #21
+ 80008f4: f001 f89b bl 8001a2e
+ HAL_NVIC_EnableIRQ(CAN_RX1_IRQn);
+ 80008f8: 2015 movs r0, #21
+ 80008fa: f001 f8b4 bl 8001a66
+
+ /* USER CODE END CAN_MspInit 1 */
+
+ }
+
+}
+ 80008fe: bf00 nop
+ 8000900: 3728 adds r7, #40 @ 0x28
+ 8000902: 46bd mov sp, r7
+ 8000904: bd80 pop {r7, pc}
+ 8000906: bf00 nop
+ 8000908: 40006400 .word 0x40006400
+ 800090c: 40021000 .word 0x40021000
+
+08000910 :
+/******************************************************************************/
+/**
+ * @brief This function handles Non maskable interrupt.
+ */
+void NMI_Handler(void)
+{
+ 8000910: b480 push {r7}
+ 8000912: 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)
+ 8000914: bf00 nop
+ 8000916: e7fd b.n 8000914
+
+08000918 :
+
+/**
+ * @brief This function handles Hard fault interrupt.
+ */
+void HardFault_Handler(void)
+{
+ 8000918: b480 push {r7}
+ 800091a: af00 add r7, sp, #0
+ /* USER CODE BEGIN HardFault_IRQn 0 */
+
+ /* USER CODE END HardFault_IRQn 0 */
+ while (1)
+ 800091c: bf00 nop
+ 800091e: e7fd b.n 800091c
+
+08000920 :
+
+/**
+ * @brief This function handles Memory management fault.
+ */
+void MemManage_Handler(void)
+{
+ 8000920: b480 push {r7}
+ 8000922: af00 add r7, sp, #0
+ /* USER CODE BEGIN MemoryManagement_IRQn 0 */
+
+ /* USER CODE END MemoryManagement_IRQn 0 */
+ while (1)
+ 8000924: bf00 nop
+ 8000926: e7fd b.n 8000924
+
+08000928 :
+
+/**
+ * @brief This function handles Pre-fetch fault, memory access fault.
+ */
+void BusFault_Handler(void)
+{
+ 8000928: b480 push {r7}
+ 800092a: af00 add r7, sp, #0
+ /* USER CODE BEGIN BusFault_IRQn 0 */
+
+ /* USER CODE END BusFault_IRQn 0 */
+ while (1)
+ 800092c: bf00 nop
+ 800092e: e7fd b.n 800092c
+
+08000930 :
+
+/**
+ * @brief This function handles Undefined instruction or illegal state.
+ */
+void UsageFault_Handler(void)
+{
+ 8000930: b480 push {r7}
+ 8000932: af00 add r7, sp, #0
+ /* USER CODE BEGIN UsageFault_IRQn 0 */
+
+ /* USER CODE END UsageFault_IRQn 0 */
+ while (1)
+ 8000934: bf00 nop
+ 8000936: e7fd b.n 8000934
+
+08000938 :
+
+/**
+ * @brief This function handles System service call via SWI instruction.
+ */
+void SVC_Handler(void)
+{
+ 8000938: b480 push {r7}
+ 800093a: af00 add r7, sp, #0
+
+ /* USER CODE END SVCall_IRQn 0 */
+ /* USER CODE BEGIN SVCall_IRQn 1 */
+
+ /* USER CODE END SVCall_IRQn 1 */
+}
+ 800093c: bf00 nop
+ 800093e: 46bd mov sp, r7
+ 8000940: f85d 7b04 ldr.w r7, [sp], #4
+ 8000944: 4770 bx lr
+
+08000946 :
+
+/**
+ * @brief This function handles Debug monitor.
+ */
+void DebugMon_Handler(void)
+{
+ 8000946: b480 push {r7}
+ 8000948: af00 add r7, sp, #0
+
+ /* USER CODE END DebugMonitor_IRQn 0 */
+ /* USER CODE BEGIN DebugMonitor_IRQn 1 */
+
+ /* USER CODE END DebugMonitor_IRQn 1 */
+}
+ 800094a: bf00 nop
+ 800094c: 46bd mov sp, r7
+ 800094e: f85d 7b04 ldr.w r7, [sp], #4
+ 8000952: 4770 bx lr
+
+08000954 :
+
+/**
+ * @brief This function handles Pendable request for system service.
+ */
+void PendSV_Handler(void)
+{
+ 8000954: b480 push {r7}
+ 8000956: af00 add r7, sp, #0
+
+ /* USER CODE END PendSV_IRQn 0 */
+ /* USER CODE BEGIN PendSV_IRQn 1 */
+
+ /* USER CODE END PendSV_IRQn 1 */
+}
+ 8000958: bf00 nop
+ 800095a: 46bd mov sp, r7
+ 800095c: f85d 7b04 ldr.w r7, [sp], #4
+ 8000960: 4770 bx lr
+
+08000962 :
+
+/**
+ * @brief This function handles System tick timer.
+ */
+void SysTick_Handler(void)
+{
+ 8000962: b580 push {r7, lr}
+ 8000964: af00 add r7, sp, #0
+ /* USER CODE BEGIN SysTick_IRQn 0 */
+
+ /* USER CODE END SysTick_IRQn 0 */
+ HAL_IncTick();
+ 8000966: f000 f899 bl 8000a9c
+ /* USER CODE BEGIN SysTick_IRQn 1 */
+
+ /* USER CODE END SysTick_IRQn 1 */
+}
+ 800096a: bf00 nop
+ 800096c: bd80 pop {r7, pc}
+ ...
+
+08000970 :
+
+/**
+ * @brief This function handles USB low priority or CAN_RX0 interrupts.
+ */
+void USB_LP_CAN_RX0_IRQHandler(void)
+{
+ 8000970: b580 push {r7, lr}
+ 8000972: af00 add r7, sp, #0
+ /* USER CODE BEGIN USB_LP_CAN_RX0_IRQn 0 */
+
+ /* USER CODE END USB_LP_CAN_RX0_IRQn 0 */
+ HAL_CAN_IRQHandler(&hcan);
+ 8000974: 4802 ldr r0, [pc, #8] @ (8000980 )
+ 8000976: f000 fd41 bl 80013fc
+ /* USER CODE BEGIN USB_LP_CAN_RX0_IRQn 1 */
+
+ /* USER CODE END USB_LP_CAN_RX0_IRQn 1 */
+}
+ 800097a: bf00 nop
+ 800097c: bd80 pop {r7, pc}
+ 800097e: bf00 nop
+ 8000980: 20000028 .word 0x20000028
+
+08000984 :
+
+/**
+ * @brief This function handles CAN RX1 interrupt.
+ */
+void CAN_RX1_IRQHandler(void)
+{
+ 8000984: b580 push {r7, lr}
+ 8000986: af00 add r7, sp, #0
+ /* USER CODE BEGIN CAN_RX1_IRQn 0 */
+
+ /* USER CODE END CAN_RX1_IRQn 0 */
+ HAL_CAN_IRQHandler(&hcan);
+ 8000988: 4802 ldr r0, [pc, #8] @ (8000994 )
+ 800098a: f000 fd37 bl 80013fc
+ /* USER CODE BEGIN CAN_RX1_IRQn 1 */
+
+ /* USER CODE END CAN_RX1_IRQn 1 */
+}
+ 800098e: bf00 nop
+ 8000990: bd80 pop {r7, pc}
+ 8000992: bf00 nop
+ 8000994: 20000028 .word 0x20000028
+
+08000998 :
+ * @brief Setup the microcontroller system
+ * @param None
+ * @retval None
+ */
+void SystemInit(void)
+{
+ 8000998: b480 push {r7}
+ 800099a: af00 add r7, sp, #0
+/* FPU settings --------------------------------------------------------------*/
+#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
+ SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */
+ 800099c: 4b06 ldr r3, [pc, #24] @ (80009b8 )
+ 800099e: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88
+ 80009a2: 4a05 ldr r2, [pc, #20] @ (80009b8 )
+ 80009a4: f443 0370 orr.w r3, r3, #15728640 @ 0xf00000
+ 80009a8: f8c2 3088 str.w r3, [r2, #136] @ 0x88
+
+ /* Configure the Vector Table location -------------------------------------*/
+#if defined(USER_VECT_TAB_ADDRESS)
+ SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
+#endif /* USER_VECT_TAB_ADDRESS */
+}
+ 80009ac: bf00 nop
+ 80009ae: 46bd mov sp, r7
+ 80009b0: f85d 7b04 ldr.w r7, [sp], #4
+ 80009b4: 4770 bx lr
+ 80009b6: bf00 nop
+ 80009b8: e000ed00 .word 0xe000ed00
+
+080009bc :
+
+ .section .text.Reset_Handler
+ .weak Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+ ldr sp, =_estack /* Atollic update: set stack pointer */
+ 80009bc: f8df d034 ldr.w sp, [pc, #52] @ 80009f4
+
+/* Call the clock system initialization function.*/
+ bl SystemInit
+ 80009c0: f7ff ffea bl 8000998
+
+/* Copy the data segment initializers from flash to SRAM */
+ ldr r0, =_sdata
+ 80009c4: 480c ldr r0, [pc, #48] @ (80009f8 )
+ ldr r1, =_edata
+ 80009c6: 490d ldr r1, [pc, #52] @ (80009fc )
+ ldr r2, =_sidata
+ 80009c8: 4a0d ldr r2, [pc, #52] @ (8000a00 )
+ movs r3, #0
+ 80009ca: 2300 movs r3, #0
+ b LoopCopyDataInit
+ 80009cc: e002 b.n 80009d4
+
+080009ce :
+
+CopyDataInit:
+ ldr r4, [r2, r3]
+ 80009ce: 58d4 ldr r4, [r2, r3]
+ str r4, [r0, r3]
+ 80009d0: 50c4 str r4, [r0, r3]
+ adds r3, r3, #4
+ 80009d2: 3304 adds r3, #4
+
+080009d4 :
+
+LoopCopyDataInit:
+ adds r4, r0, r3
+ 80009d4: 18c4 adds r4, r0, r3
+ cmp r4, r1
+ 80009d6: 428c cmp r4, r1
+ bcc CopyDataInit
+ 80009d8: d3f9 bcc.n 80009ce
+
+/* Zero fill the bss segment. */
+ ldr r2, =_sbss
+ 80009da: 4a0a ldr r2, [pc, #40] @ (8000a04 )
+ ldr r4, =_ebss
+ 80009dc: 4c0a ldr r4, [pc, #40] @ (8000a08 )
+ movs r3, #0
+ 80009de: 2300 movs r3, #0
+ b LoopFillZerobss
+ 80009e0: e001 b.n 80009e6
+
+080009e2 :
+
+FillZerobss:
+ str r3, [r2]
+ 80009e2: 6013 str r3, [r2, #0]
+ adds r2, r2, #4
+ 80009e4: 3204 adds r2, #4
+
+080009e6 :
+
+LoopFillZerobss:
+ cmp r2, r4
+ 80009e6: 42a2 cmp r2, r4
+ bcc FillZerobss
+ 80009e8: d3fb bcc.n 80009e2