Skip to content

Commit

Permalink
remove unused timer inits for now
Browse files Browse the repository at this point in the history
  • Loading branch information
vegano1 committed Jan 12, 2024
1 parent 50116d6 commit db4a795
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 64 deletions.
1 change: 0 additions & 1 deletion hepa-uv/firmware/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ set(HEPAUV_FW_NON_LINTABLE_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/clocking.c
${CMAKE_CURRENT_SOURCE_DIR}/utility_gpio.c
${CMAKE_CURRENT_SOURCE_DIR}/can.c
${CMAKE_CURRENT_SOURCE_DIR}/led_hardware.c
${CMAKE_CURRENT_SOURCE_DIR}/i2c_setup.c
${COMMON_EXECUTABLE_DIR}/errors/errors.c
${COMMON_EXECUTABLE_DIR}/system/app_update.c
Expand Down
54 changes: 13 additions & 41 deletions hepa-uv/firmware/stm32g4xx_it.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "FreeRTOSConfig.h"
#include "can/firmware/hal_can.h"
#include "stm32g4xx_hal.h"

/** @addtogroup STM32G4xx_HAL_Examples
* @{
*/
Expand All @@ -36,22 +37,14 @@
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables
---------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/

/* Private function prototypes
-----------------------------------------------*/
/* Private functions
---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/

/* External variables
--------------------------------------------------------*/
/* External variables --------------------------------------------------------*/
DMA_HandleTypeDef hdma_spi1_tx;
DMA_HandleTypeDef hdma_spi1_rx;
extern TIM_HandleTypeDef htim1;
extern TIM_HandleTypeDef htim2;
extern TIM_HandleTypeDef htim3;
extern TIM_HandleTypeDef htim15;

/******************************************************************************/
/* Cortex-M4 Processor Exceptions Handlers */
Expand Down Expand Up @@ -122,6 +115,14 @@ void DebugMon_Handler(void) {}
/* file (startup_stm32g4xxxx.s). */
/******************************************************************************/

/**
* @brief This function handles PPP interrupt request.
* @param None
* @retval None
*/
/*void PPP_IRQHandler(void)
{
}*/
/**
* @brief This function handles DMA1 channel2 global interrupt.
*/
Expand All @@ -142,35 +143,6 @@ void FDCAN1_IT0_IRQHandler(void) {
HAL_FDCAN_IRQHandler(can_get_device_handle());
}

/**
* @brief This function handles TIM1 update interrupt and TIM16 global
* interrupt.
*/
__attribute__((section(".ccmram")))
void TIM1_UP_TIM16_IRQHandler(void) {
// We ONLY ever enable the Update interrupt, so for a small efficiency gain
// we always make the assumption that this interrupt was triggered by the
// TIM_IT_UPDATE source.
// __HAL_TIM_CLEAR_IT(&htim1, TIM_IT_UPDATE);
//call_brushed_motor_handler();
HAL_TIM_IRQHandler(&htim1);
}

/**
* @brief This function handles TIM1 capture/compare interrupt.
*/
__attribute__((section(".ccmram")))
void TIM1_CC_IRQHandler(void) { HAL_TIM_IRQHandler(&htim1); }

__attribute__((section(".ccmram")))
void TIM2_IRQHandler(void) { HAL_TIM_IRQHandler(&htim2); }

__attribute__((section(".ccmram")))
void TIM3_IRQHandler(void) { HAL_TIM_IRQHandler(&htim3); }

__attribute__((section(".ccmram")))
void TIM1_BRK_TIM15_IRQHandler(void) { HAL_TIM_IRQHandler(&htim15); }

extern void xPortSysTickHandler(void);
void SysTick_Handler(void) {
HAL_IncTick();
Expand Down
39 changes: 17 additions & 22 deletions hepa-uv/firmware/stm32g4xx_it.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/**
******************************************************************************
* @file Templates/Inc/stm32g4xx_it.h
* @author MCD Application Team
* @brief This file contains the headers of the interrupt handlers.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
******************************************************************************
* @file Templates/Inc/stm32g4xx_it.h
* @author MCD Application Team
* @brief This file contains the headers of the interrupt handlers.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef STM32G4xx_IT_H
Expand Down Expand Up @@ -43,11 +43,6 @@ void SysTick_Handler(void);
void DMA1_Channel2_IRQHandler(void);
void DMA1_Channel3_IRQHandler(void);
void FDCAN1_IT0_IRQHandler(void);
void TIM1_CC_IRQHandler(void);
void TIM3_IRQHandler(void);
void TIM7_IRQHandler(void);
void TIM8_CC_IRQHandler(void);
void TIM8_UP_IRQHandler(void);

#ifdef __cplusplus
}
Expand Down

0 comments on commit db4a795

Please sign in to comment.