Repository: UWaterloo-Formula-Electric/firmware
Pull request #74: Implementing TSSI lights with timer interrupts.
Author: login: EmadsGitHub
Created: 2025-04-06T23:25:42Z | Merged: 2025-04-07T00:49:41Z



Diff:
diff --git a/bmu/Cube-F7-Src-respin/2018_BMU.ioc b/bmu/Cube-F7-Src-respin/2018_BMU.ioc
index 1025e2f8..d5baf2be 100644
--- a/bmu/Cube-F7-Src-respin/2018_BMU.ioc
+++ b/bmu/Cube-F7-Src-respin/2018_BMU.ioc
@@ -119,10 +119,11 @@ Mcu.IP15=TIM4
 Mcu.IP16=TIM5
 Mcu.IP17=TIM6
 Mcu.IP18=TIM7
-Mcu.IP19=TIM9
+Mcu.IP19=TIM8
 Mcu.IP2=CAN1
-Mcu.IP20=TIM12
-Mcu.IP21=USART2
+Mcu.IP20=TIM9
+Mcu.IP21=TIM12
+Mcu.IP22=USART2
 Mcu.IP3=CAN3
 Mcu.IP4=CORTEX_M7
 Mcu.IP5=DMA
@@ -130,7 +131,7 @@ Mcu.IP6=FREERTOS
 Mcu.IP7=IWDG
 Mcu.IP8=NVIC
 Mcu.IP9=RCC
-Mcu.IPNb=22
+Mcu.IPNb=23
 Mcu.Name=STM32F767VITx
 Mcu.Package=LQFP100
 Mcu.Pin0=PE2
@@ -190,11 +191,12 @@ Mcu.Pin57=VP_TIM5_VS_ClockSourceINT
 Mcu.Pin58=VP_TIM6_VS_ClockSourceINT
 Mcu.Pin59=VP_TIM7_VS_ClockSourceINT
 Mcu.Pin6=PA0/WKUP
-Mcu.Pin60=VP_TIM9_VS_ClockSourceINT
+Mcu.Pin60=VP_TIM8_VS_ClockSourceINT
+Mcu.Pin61=VP_TIM9_VS_ClockSourceINT
 Mcu.Pin7=PA1
 Mcu.Pin8=PA2
 Mcu.Pin9=PA3
-Mcu.PinsNb=61
+Mcu.PinsNb=62
 Mcu.ThirdPartyNb=0
 Mcu.UserConstants=
 Mcu.UserName=STM32F767VITx
@@ -225,7 +227,9 @@ NVIC.SavedPendsvIrqHandlerGenerated=true
 NVIC.SavedSvcallIrqHandlerGenerated=true
 NVIC.SavedSystickIrqHandlerGenerated=true
 NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:true\:false\:true\:false
+NVIC.TIM1_UP_TIM10_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true
 NVIC.TIM3_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true
+NVIC.TIM8_UP_TIM13_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true
 NVIC.USART2_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true
 NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
 PA0/WKUP.GPIOParameters=GPIO_Label
@@ -453,7 +457,7 @@ ProjectManager.ToolChainLocation=
 ProjectManager.UAScriptAfterPath=
 ProjectManager.UAScriptBeforePath=
 ProjectManager.UnderRoot=false
-ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-MX_DMA_Init-DMA-false-HAL-true,3-SystemClock_Config-RCC-false-HAL-true,4-MX_ADC1_Init-ADC1-false-HAL-true,5-MX_ADC2_Init-ADC2-false-HAL-true,6-MX_CAN3_Init-CAN3-false-HAL-true,7-MX_SPI4_Init-SPI4-false-HAL-true,8-MX_TIM3_Init-TIM3-false-HAL-true,9-MX_TIM5_Init-TIM5-false-HAL-true,10-MX_USART2_UART_Init-USART2-false-HAL-true,11-MX_TIM4_Init-TIM4-false-HAL-true,12-MX_IWDG_Init-IWDG-false-HAL-true,13-MX_TIM6_Init-TIM6-false-HAL-true,14-MX_TIM9_Init-TIM9-false-HAL-true,15-MX_CAN1_Init-CAN1-false-HAL-true,16-MX_TIM12_Init-TIM12-false-HAL-true,17-MX_TIM2_Init-TIM2-false-HAL-true,18-MX_TIM1_Init-TIM1-false-HAL-true,19-MX_TIM7_Init-TIM7-false-HAL-true,0-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true
+ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-MX_DMA_Init-DMA-false-HAL-true,3-SystemClock_Config-RCC-false-HAL-true,4-MX_ADC1_Init-ADC1-false-HAL-true,5-MX_ADC2_Init-ADC2-false-HAL-true,6-MX_CAN3_Init-CAN3-false-HAL-true,7-MX_SPI4_Init-SPI4-false-HAL-true,8-MX_TIM3_Init-TIM3-false-HAL-true,9-MX_TIM5_Init-TIM5-false-HAL-true,10-MX_USART2_UART_Init-USART2-false-HAL-true,11-MX_TIM4_Init-TIM4-false-HAL-true,12-MX_IWDG_Init-IWDG-false-HAL-true,13-MX_TIM6_Init-TIM6-false-HAL-true,14-MX_TIM9_Init-TIM9-false-HAL-true,15-MX_CAN1_Init-CAN1-false-HAL-true,16-MX_TIM12_Init-TIM12-false-HAL-true,17-MX_TIM2_Init-TIM2-false-HAL-true,18-MX_TIM1_Init-TIM1-false-HAL-true,19-MX_TIM7_Init-TIM7-false-HAL-true,20-MX_TIM8_Init-TIM8-false-HAL-true,0-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true
 RCC.AHBFreq_Value=200000000
 RCC.APB1CLKDivider=RCC_HCLK_DIV4
 RCC.APB1Freq_Value=50000000
@@ -599,6 +603,10 @@ TIM7.IPParameters=TIM_MasterOutputTrigger,AutoReloadPreload,Prescaler,Period
 TIM7.Period=2000
 TIM7.Prescaler=9999
 TIM7.TIM_MasterOutputTrigger=TIM_TRGO_UPDATE
+TIM8.AutoReloadPreload=TIM_AUTORELOAD_PRELOAD_ENABLE
+TIM8.IPParameters=Prescaler,Period,AutoReloadPreload
+TIM8.Period=24999
+TIM8.Prescaler=999
 TIM9.IPParameters=Prescaler,Period
 TIM9.Period=65535
 TIM9.Prescaler=200
@@ -624,6 +632,8 @@ VP_TIM6_VS_ClockSourceINT.Mode=Enable_Timer
 VP_TIM6_VS_ClockSourceINT.Signal=TIM6_VS_ClockSourceINT
 VP_TIM7_VS_ClockSourceINT.Mode=Enable_Timer
 VP_TIM7_VS_ClockSourceINT.Signal=TIM7_VS_ClockSourceINT
+VP_TIM8_VS_ClockSourceINT.Mode=Internal
+VP_TIM8_VS_ClockSourceINT.Signal=TIM8_VS_ClockSourceINT
 VP_TIM9_VS_ClockSourceINT.Mode=Internal
 VP_TIM9_VS_ClockSourceINT.Signal=TIM9_VS_ClockSourceINT
 board=2018_bmu
diff --git a/bmu/Cube-F7-Src-respin/Inc/stm32f7xx_it.h b/bmu/Cube-F7-Src-respin/Inc/stm32f7xx_it.h
index bd0552d5..c56ff10b 100644
--- a/bmu/Cube-F7-Src-respin/Inc/stm32f7xx_it.h
+++ b/bmu/Cube-F7-Src-respin/Inc/stm32f7xx_it.h
@@ -75,8 +75,10 @@ void CAN1_TX_IRQHandler(void);
 void CAN1_RX0_IRQHandler(void);
 void CAN1_RX1_IRQHandler(void);
 void CAN1_SCE_IRQHandler(void);
+void TIM1_UP_TIM10_IRQHandler(void);
 void TIM3_IRQHandler(void);
 void USART2_IRQHandler(void);
+void TIM8_UP_TIM13_IRQHandler(void);
 void DMA2_Stream0_IRQHandler(void);
 void DMA2_Stream2_IRQHandler(void);
 void CAN3_TX_IRQHandler(void);
diff --git a/bmu/Cube-F7-Src-respin/Inc/tim.h b/bmu/Cube-F7-Src-respin/Inc/tim.h
index 74fc7e53..c2b0b289 100644
--- a/bmu/Cube-F7-Src-respin/Inc/tim.h
+++ b/bmu/Cube-F7-Src-respin/Inc/tim.h
@@ -46,6 +46,8 @@ extern TIM_HandleTypeDef htim6;
 
 extern TIM_HandleTypeDef htim7;
 
+extern TIM_HandleTypeDef htim8;
+
 extern TIM_HandleTypeDef htim9;
 
 extern TIM_HandleTypeDef htim12;
@@ -61,6 +63,7 @@ void MX_TIM4_Init(void);
 void MX_TIM5_Init(void);
 void MX_TIM6_Init(void);
 void MX_TIM7_Init(void);
+void MX_TIM8_Init(void);
 void MX_TIM9_Init(void);
 void MX_TIM12_Init(void);
 
diff --git a/bmu/Cube-F7-Src-respin/Makefile b/bmu/Cube-F7-Src-respin/Makefile
index 23c9209c..1fc6d114 100644
--- a/bmu/Cube-F7-Src-respin/Makefile
+++ b/bmu/Cube-F7-Src-respin/Makefile
@@ -1,5 +1,5 @@
 ##########################################################################################################################
-# File automatically-generated by tool: [projectgenerator] version: [4.4.0-B60] date: [Tue Jan 14 19:36:10 EST 2025] 
+# File automatically-generated by tool: [projectgenerator] version: [4.5.0-RC5] date: [Sun Apr 06 20:28:40 EDT 2025] 
 ##########################################################################################################################
 
 # ------------------------------------------------
@@ -170,7 +170,7 @@ CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)"
 # LDFLAGS
 #######################################
 # link script
-LDSCRIPT = STM32F767VITx_FLASH.ld
+LDSCRIPT = stm32f767vitx_flash.ld
 
 # libraries
 LIBS = -lc -lm -lnosys 
diff --git a/bmu/Cube-F7-Src-respin/Src/main.c b/bmu/Cube-F7-Src-respin/Src/main.c
index 127b9962..5430638c 100644
--- a/bmu/Cube-F7-Src-respin/Src/main.c
+++ b/bmu/Cube-F7-Src-respin/Src/main.c
@@ -144,6 +144,7 @@ int main(void)
   MX_TIM2_Init();
   MX_TIM1_Init();
   MX_TIM7_Init();
+  MX_TIM8_Init();
   /* USER CODE BEGIN 2 */
   userInit();
   printWDResetState();
@@ -224,7 +225,11 @@ void SystemClock_Config(void)
 }
 
 /* USER CODE BEGIN 4 */
-
+void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim){
+  if (htim->Instance == TSSI_TIMER_HANDLE.Instance) {
+    HAL_GPIO_TogglePin(TSSI_RED_EN_GPIO_Port, TSSI_RED_EN_Pin);
+  }
+}
 /* USER CODE END 4 */
 
 /**
diff --git a/bmu/Cube-F7-Src-respin/Src/stm32f7xx_it.c b/bmu/Cube-F7-Src-respin/Src/stm32f7xx_it.c
index e92ed92b..dad0e67e 100644
--- a/bmu/Cube-F7-Src-respin/Src/stm32f7xx_it.c
+++ b/bmu/Cube-F7-Src-respin/Src/stm32f7xx_it.c
@@ -79,7 +79,9 @@ extern ADC_HandleTypeDef hadc1;
 extern ADC_HandleTypeDef hadc2;
 extern CAN_HandleTypeDef hcan1;
 extern CAN_HandleTypeDef hcan3;
+extern TIM_HandleTypeDef htim1;
 extern TIM_HandleTypeDef htim3;
+extern TIM_HandleTypeDef htim8;
 extern DMA_HandleTypeDef hdma_usart2_rx;
 extern UART_HandleTypeDef huart2;
 /* USER CODE BEGIN EV */
@@ -289,6 +291,20 @@ void CAN1_SCE_IRQHandler(void)
   /* USER CODE END CAN1_SCE_IRQn 1 */
 }
 
+/**
+  * @brief This function handles TIM1 update interrupt and TIM10 global interrupt.
+  */
+void TIM1_UP_TIM10_IRQHandler(void)
+{
+  /* USER CODE BEGIN TIM1_UP_TIM10_IRQn 0 */
+
+  /* USER CODE END TIM1_UP_TIM10_IRQn 0 */
+  HAL_TIM_IRQHandler(&htim1);
+  /* USER CODE BEGIN TIM1_UP_TIM10_IRQn 1 */
+
+  /* USER CODE END TIM1_UP_TIM10_IRQn 1 */
+}
+
 /**
   * @brief This function handles TIM3 global interrupt.
   */
@@ -317,6 +333,20 @@ void USART2_IRQHandler(void)
   /* USER CODE END USART2_IRQn 1 */
 }
 
+/**
+  * @brief This function handles TIM8 update interrupt and TIM13 global interrupt.
+  */
+void TIM8_UP_TIM13_IRQHandler(void)
+{
+  /* USER CODE BEGIN TIM8_UP_TIM13_IRQn 0 */
+
+  /* USER CODE END TIM8_UP_TIM13_IRQn 0 */
+  HAL_TIM_IRQHandler(&htim8);
+  /* USER CODE BEGIN TIM8_UP_TIM13_IRQn 1 */
+
+  /* USER CODE END TIM8_UP_TIM13_IRQn 1 */
+}
+
 /**
   * @brief This function handles DMA2 stream0 global interrupt.
   */
diff --git a/bmu/Cube-F7-Src-respin/Src/tim.c b/bmu/Cube-F7-Src-respin/Src/tim.c
index ee3a17f7..c2bade30 100644
--- a/bmu/Cube-F7-Src-respin/Src/tim.c
+++ b/bmu/Cube-F7-Src-respin/Src/tim.c
@@ -31,6 +31,7 @@ TIM_HandleTypeDef htim4;
 TIM_HandleTypeDef htim5;
 TIM_HandleTypeDef htim6;
 TIM_HandleTypeDef htim7;
+TIM_HandleTypeDef htim8;
 TIM_HandleTypeDef htim9;
 TIM_HandleTypeDef htim12;
 
@@ -351,6 +352,48 @@ void MX_TIM7_Init(void)
 
   /* USER CODE END TIM7_Init 2 */
 
+}
+/* TIM8 init function */
+void MX_TIM8_Init(void)
+{
+
+  /* USER CODE BEGIN TIM8_Init 0 */
+
+  /* USER CODE END TIM8_Init 0 */
+
+  TIM_ClockConfigTypeDef sClockSourceConfig = {0};
+  TIM_MasterConfigTypeDef sMasterConfig = {0};
+
+  /* USER CODE BEGIN TIM8_Init 1 */
+
+  /* USER CODE END TIM8_Init 1 */
+  htim8.Instance = TIM8;
+  htim8.Init.Prescaler = 999;
+  htim8.Init.CounterMode = TIM_COUNTERMODE_UP;
+  htim8.Init.Period = 24999;
+  htim8.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
+  htim8.Init.RepetitionCounter = 0;
+  htim8.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
+  if (HAL_TIM_Base_Init(&htim8) != HAL_OK)
+  {
+    Error_Handler();
+  }
+  sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
+  if (HAL_TIM_ConfigClockSource(&htim8, &sClockSourceConfig) != HAL_OK)
+  {
+    Error_Handler();
+  }
+  sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
+  sMasterConfig.MasterOutputTrigger2 = TIM_TRGO2_RESET;
+  sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
+  if (HAL_TIMEx_MasterConfigSynchronization(&htim8, &sMasterConfig) != HAL_OK)
+  {
+    Error_Handler();
+  }
+  /* USER CODE BEGIN TIM8_Init 2 */
+
+  /* USER CODE END TIM8_Init 2 */
+
 }
 /* TIM9 init function */
 void MX_TIM9_Init(void)
@@ -452,6 +495,9 @@ void HAL_TIM_IC_MspInit(TIM_HandleTypeDef* tim_icHandle)
     GPIO_InitStruct.Alternate = GPIO_AF1_TIM1;
     HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
 
+    /* TIM1 interrupt Init */
+    HAL_NVIC_SetPriority(TIM1_UP_TIM10_IRQn, 5, 0);
+    HAL_NVIC_EnableIRQ(TIM1_UP_TIM10_IRQn);
   /* USER CODE BEGIN TIM1_MspInit 1 */
 
   /* USER CODE END TIM1_MspInit 1 */
@@ -547,6 +593,21 @@ void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* tim_baseHandle)
 
   /* USER CODE END TIM7_MspInit 1 */
   }
+  else if(tim_baseHandle->Instance==TIM8)
+  {
+  /* USER CODE BEGIN TIM8_MspInit 0 */
+
+  /* USER CODE END TIM8_MspInit 0 */
+    /* TIM8 clock enable */
+    __HAL_RCC_TIM8_CLK_ENABLE();
+
+    /* TIM8 interrupt Init */
+    HAL_NVIC_SetPriority(TIM8_UP_TIM13_IRQn, 5, 0);
+    HAL_NVIC_EnableIRQ(TIM8_UP_TIM13_IRQn);
+  /* USER CODE BEGIN TIM8_MspInit 1 */
+
+  /* USER CODE END TIM8_MspInit 1 */
+  }
   else if(tim_baseHandle->Instance==TIM9)
   {
   /* USER CODE BEGIN TIM9_MspInit 0 */
@@ -642,6 +703,8 @@ void HAL_TIM_IC_MspDeInit(TIM_HandleTypeDef* tim_icHandle)
     */
     HAL_GPIO_DeInit(GPIOA, TACH_5_Pin|TACH_6_Pin|TACH_7_Pin);
 
+    /* TIM1 interrupt Deinit */
+    HAL_NVIC_DisableIRQ(TIM1_UP_TIM10_IRQn);
   /* USER CODE BEGIN TIM1_MspDeInit 1 */
 
   /* USER CODE END TIM1_MspDeInit 1 */
@@ -729,6 +792,20 @@ void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* tim_baseHandle)
 
   /* USER CODE END TIM7_MspDeInit 1 */
   }
+  else if(tim_baseHandle->Instance==TIM8)
+  {
+  /* USER CODE BEGIN TIM8_MspDeInit 0 */
+
+  /* USER CODE END TIM8_MspDeInit 0 */
+    /* Peripheral clock disable */
+    __HAL_RCC_TIM8_CLK_DISABLE();
+
+    /* TIM8 interrupt Deinit */
+    HAL_NVIC_DisableIRQ(TIM8_UP_TIM13_IRQn);
+  /* USER CODE BEGIN TIM8_MspDeInit 1 */
+
+  /* USER CODE END TIM8_MspDeInit 1 */
+  }
   else if(tim_baseHandle->Instance==TIM9)
   {
   /* USER CODE BEGIN TIM9_MspDeInit 0 */
diff --git a/bmu/Inc/bsp.h b/bmu/Inc/bsp.h
index 38cbf03d..3548b206 100644
--- a/bmu/Inc/bsp.h
+++ b/bmu/Inc/bsp.h
@@ -41,8 +41,8 @@
 #define DC_DC_OFF           HAL_GPIO_WritePin(CONT_DC_DC_GPIO_Port,CONT_DC_DC_Pin,GPIO_PIN_RESET);
 #define TSSI_GREEN_ON       HAL_GPIO_WritePin(TSSI_GREEN_EN_GPIO_Port, TSSI_GREEN_EN_Pin, GPIO_PIN_SET)
 #define TSSI_GREEN_OFF      HAL_GPIO_WritePin(TSSI_GREEN_EN_GPIO_Port, TSSI_GREEN_EN_Pin, GPIO_PIN_RESET)
-#define TSSI_RED_ON         HAL_GPIO_WritePin(TSSI_RED_EN_GPIO_Port, TSSI_RED_EN_Pin, GPIO_PIN_SET)
-#define TSSI_RED_OFF         HAL_GPIO_WritePin(TSSI_RED_EN_GPIO_Port, TSSI_RED_EN_Pin, GPIO_PIN_RESET)
+#define TSSI_RED_ON         HAL_TIM_Base_Start_IT(&TSSI_TIMER_HANDLE);
+#define TSSI_RED_OFF        HAL_TIM_Base_Stop_IT(&TSSI_TIMER_HANDLE);
 #define DEBUG_UART_HANDLE huart2
 #define CAN_HANDLE hcan3
 #define CHARGER_CAN_HANDLE hcan1
@@ -63,6 +63,7 @@
 #define HW_CHECK_HANDLE htim2
 #define CONT_SENSE_ADC_HANDLE hadc1
 #define CONT_SENSE_TIM htim7
+#define TSSI_TIMER_HANDLE htim8
 
 typedef enum taskId_e{
     FSM_TASK_ID = 1,                // 1
diff --git a/common/Data/2024CAR.ini b/common/Data/2024CAR.ini
deleted file mode 100644
index ec486c2f..00000000
--- a/common/Data/2024CAR.ini
+++ /dev/null
@@ -1,165 +0,0 @@
-[View_Vehicles]
-HIDDEN=
-ORDER=0,1,
-DEFINITIONS=
-COLUMNWIDTHS=125,150,
-[View_Vehicle]
-HIDDEN=
-ORDER=0,1,
-DEFINITIONS=
-COLUMNWIDTHS=125,125,
-[View_VehicleNetworks]
-HIDDEN=3,
-ORDER=0,1,2,3,4,
-DEFINITIONS=3,
-COLUMNWIDTHS=125,125,100,100,150,100,
-[View_VehicleNetwork]
-HIDDEN=
-ORDER=0,1,2,3,4,
-DEFINITIONS=
-COLUMNWIDTHS=125,125,100,125,150,
-[View_VehicleNetworkTxMessages]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,7,8,9,
-DEFINITIONS=1,
-COLUMNWIDTHS=125,125,55,100,50,100,100,100,150,50,
-[View_VehicleNetworkSignals]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
-DEFINITIONS=2,
-COLUMNWIDTHS=125,125,100,50,100,50,100,100,100,50,50,50,50,100,100,150,50,
-[View_VehicleControlUnit]
-HIDDEN=
-ORDER=0,1,2,3,4,
-DEFINITIONS=
-COLUMNWIDTHS=125,125,100,125,150,
-[View_VehicleGateways]
-HIDDEN=
-ORDER=0,1,2,
-DEFINITIONS=
-COLUMNWIDTHS=125,125,100,
-[View_VehicleGatewaySignals]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,
-DEFINITIONS=
-COLUMNWIDTHS=125,125,125,125,125,125,125,
-[View_Networks]
-HIDDEN=2,
-ORDER=0,1,2,3,
-DEFINITIONS=3,
-COLUMNWIDTHS=125,100,100,150,100,
-[View_Network]
-HIDDEN=
-ORDER=0,1,2,3,
-DEFINITIONS=
-COLUMNWIDTHS=125,125,100,150,
-[View_NetworkTxMessages]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,7,8,9,
-DEFINITIONS=1,
-COLUMNWIDTHS=125,125,55,100,50,100,100,100,150,50,
-[View_NetworkTxSignals]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,
-DEFINITIONS=2,
-COLUMNWIDTHS=125,125,100,50,100,50,100,100,100,50,50,50,50,100,100,150,-1,50,
-[View_NetworkNodeGroup]
-HIDDEN=
-ORDER=0,1,2,
-DEFINITIONS=
-COLUMNWIDTHS=125,100,150,
-[View_Ecus]
-HIDDEN=
-ORDER=0,1,
-DEFINITIONS=
-COLUMNWIDTHS=125,150,
-[View_Ecu]
-HIDDEN=
-ORDER=0,1,2,3,
-DEFINITIONS=
-COLUMNWIDTHS=125,125,100,150,
-[View_EnvVars]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,7,8,9,
-DEFINITIONS=
-COLUMNWIDTHS=125,100,100,50,50,50,50,100,100,150,
-[View_EnvVar]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,7,8,9,10,
-DEFINITIONS=
-COLUMNWIDTHS=125,125,100,100,50,50,50,50,100,100,150,
-[View_NodeGroups]
-HIDDEN=
-ORDER=0,1,
-DEFINITIONS=
-COLUMNWIDTHS=125,150,
-[View_NodeGroup]
-HIDDEN=
-ORDER=0,1,2,3,
-DEFINITIONS=
-COLUMNWIDTHS=125,125,55,150,
-[View_Nodes]
-HIDDEN=
-ORDER=0,1,2,
-DEFINITIONS=
-COLUMNWIDTHS=125,100,150,
-[View_Node]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
-DEFINITIONS=2,
-COLUMNWIDTHS=125,125,100,50,50,100,100,100,50,50,50,50,100,100,150,-1,50,
-[View_NodeTxMessages]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,7,8,
-DEFINITIONS=1,
-COLUMNWIDTHS=125,125,55,100,50,100,100,150,50,
-[View_NodeTxMsg]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
-DEFINITIONS=2,
-COLUMNWIDTHS=125,125,100,50,50,100,100,100,50,50,50,50,100,100,150,-1,50,
-[View_NodeTxSignals]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
-DEFINITIONS=2,
-COLUMNWIDTHS=125,125,100,50,50,100,100,100,50,50,50,50,100,100,150,-1,50,
-[View_NodeRxSignals]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
-DEFINITIONS=2,
-COLUMNWIDTHS=125,125,100,50,50,100,100,100,50,50,50,50,100,100,150,-1,50,
-[View_NodeTxSigs]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,7,8,9,10,11,12,13,
-DEFINITIONS=2,
-COLUMNWIDTHS=125,125,50,100,100,100,50,50,50,50,100,100,150,50,
-[View_NodeRxSigs]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,7,8,9,10,11,12,13,
-DEFINITIONS=2,
-COLUMNWIDTHS=125,125,50,100,100,100,50,50,50,50,100,100,150,50,
-[View_Messages]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,7,8,
-DEFINITIONS=1,
-COLUMNWIDTHS=125,55,100,50,100,100,100,150,50,
-[View_Message]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
-DEFINITIONS=2,
-COLUMNWIDTHS=125,125,100,50,50,100,100,100,50,50,50,50,100,100,150,50,
-[View_Signals]
-HIDDEN=
-ORDER=0,1,2,3,4,5,6,7,8,9,10,11,12,
-DEFINITIONS=2,
-COLUMNWIDTHS=125,50,100,100,100,50,50,50,50,100,100,150,50,
-[View_ValueTables]
-HIDDEN=
-ORDER=0,1,
-DEFINITIONS=
-COLUMNWIDTHS=125,150,
-[View_AttrDefs]
-HIDDEN=6,
-ORDER=0,1,2,3,4,5,
-DEFINITIONS=
-COLUMNWIDTHS=125,100,100,50,50,100,150,


Reviews:
user: login: aryanGajelli
state: CHANGES_REQUESTED
author_association: COLLABORATOR
submitted_at: 2025-04-06T23:45:52Z
user: login: aryanGajelli
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-06T23:55:02Z
user: login: EmadsGitHub
body: Good
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-07T00:03:07Z
user: login: aryanGajelli
body: Tested on Car
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-04-07T00:48:25Z

Review comments:
path: common/Data/2024CAR.ini
user: login: aryanGajelli
body: No need to commit this file
created_at: 2025-04-06T23:26:23Z
author_association: COLLABORATOR
diff_hunk: @@ -224,7 +225,9 @@ void SystemClock_Config(void)
 }
 
 /* USER CODE BEGIN 4 */
-
+void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim){
+  HAL_GPIO_TogglePin(GPIOD, GPIO_PIN_10);
path: bmu/Cube-F7-Src-respin/Src/main.c
user: login: aryanGajelli
body: You need to check if the correct timer is called:
```c
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
  /* USER CODE BEGIN Callback 0 */
  
  if (htim->Instance == RPM_TIMER_HANDLE.Instance) {
    int32_t curr = encoderCount();
    rpm = (float)(curr - last) * SAMPLES_PER_SEC * RPS_TO_RPM / TICKS_PER_REV;
    last = curr;
  }
  /* USER CODE END Callback 0 */
  if (htim->Instance == TIM14) {
    HAL_IncTick();
  }
  /* USER CODE BEGIN Callback 1 */
  
  /* USER CODE END Callback 1 */
}
```

Also import the "main.h" file and use the pin/port assignments from there directly as it will let us change the pins in the future

```c
HAL_GPIO_TogglePin(TSSI_RED_EN_GPIO_Port, TSSI_RED_EN_Pin);
```
created_at: 2025-04-06T23:45:23Z
author_association: COLLABORATOR
diff_hunk: @@ -63,6 +63,7 @@
 #define HW_CHECK_HANDLE htim2
 #define CONT_SENSE_ADC_HANDLE hadc1
 #define CONT_SENSE_TIM htim7
+#define TSSI_TIM htim8
path: bmu/Inc/bsp.h
user: login: aryanGajelli
body: Current convention is to call this TSSI_TIM_HANDLE
created_at: 2025-04-06T23:55:02Z
author_association: COLLABORATOR

PR comments:
user: login: aryanGajelli
created_at: 2025-04-07T00:07:03Z
body: When fixing changes, resolve the conversation to ensure the reviewer knows you addressed it. Also ask for a re-review
author_association: COLLABORATOR
user: login: aryanGajelli
created_at: 2025-04-07T00:07:48Z
body: There is another bug here where the auto reload preload is disabled. This means it will run once and stop:
![image](https://github.com/user-attachments/assets/8cf8cd98-1038-4398-aa55-566b1a525a6b)

author_association: COLLABORATOR
user: login: EmadsGitHub
created_at: 2025-04-07T00:20:22Z
body: Also good
author_association: COLLABORATOR