mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-23 17:13:47 +08:00
clear out unused tim CC4 interrupt
This commit is contained in:
+1
-1
Submodule CubeMX2Makefile updated: 11edeb8424...6a64be8246
@@ -53,7 +53,6 @@ void UsageFault_Handler(void);
|
||||
void DebugMon_Handler(void);
|
||||
void SysTick_Handler(void);
|
||||
void ADC_IRQHandler(void);
|
||||
void TIM1_CC_IRQHandler(void);
|
||||
void OTG_FS_IRQHandler(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -108,8 +108,8 @@ C_INCLUDES += -IMiddlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS
|
||||
C_INCLUDES += -IMiddlewares/Third_Party/FreeRTOS/Source/include
|
||||
C_INCLUDES += -IMiddlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F
|
||||
# compile gcc flags
|
||||
ASFLAGS = -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections
|
||||
CFLAGS = -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections
|
||||
ASFLAGS = -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections
|
||||
CFLAGS = -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -g -gdwarf-2
|
||||
endif
|
||||
@@ -124,7 +124,7 @@ LDSCRIPT = STM32F405RGTx_FLASH.ld
|
||||
# libraries
|
||||
LIBS = -lc -lm -lnosys
|
||||
LIBDIR =
|
||||
LDFLAGS = -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -specs=nano.specs -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections
|
||||
LDFLAGS = -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -specs=nano.specs -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections
|
||||
|
||||
# default action: build all
|
||||
all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin
|
||||
|
||||
@@ -171,7 +171,6 @@ NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true
|
||||
NVIC.OTG_FS_IRQn=true\:5\:0\:false\:false\:true
|
||||
NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
|
||||
NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true
|
||||
NVIC.TIM1_CC_IRQn=true\:5\:0\:false\:true\:true\:2
|
||||
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true
|
||||
PA0-WKUP.GPIOParameters=GPIO_Label
|
||||
PA0-WKUP.GPIO_Label=VBUS_S
|
||||
|
||||
@@ -169,9 +169,6 @@ void MX_NVIC_Init(void)
|
||||
/* ADC_IRQn interrupt configuration */
|
||||
HAL_NVIC_SetPriority(ADC_IRQn, 5, 0);
|
||||
HAL_NVIC_EnableIRQ(ADC_IRQn);
|
||||
/* TIM1_CC_IRQn interrupt configuration */
|
||||
HAL_NVIC_SetPriority(TIM1_CC_IRQn, 5, 0);
|
||||
HAL_NVIC_EnableIRQ(TIM1_CC_IRQn);
|
||||
}
|
||||
|
||||
/* USER CODE BEGIN 4 */
|
||||
|
||||
@@ -45,7 +45,6 @@ extern PCD_HandleTypeDef hpcd_USB_OTG_FS;
|
||||
extern ADC_HandleTypeDef hadc1;
|
||||
extern ADC_HandleTypeDef hadc2;
|
||||
extern ADC_HandleTypeDef hadc3;
|
||||
extern TIM_HandleTypeDef htim1;
|
||||
|
||||
/******************************************************************************/
|
||||
/* Cortex-M4 Processor Interruption and Exception Handlers */
|
||||
@@ -183,20 +182,6 @@ void ADC_IRQHandler(void)
|
||||
/* USER CODE END ADC_IRQn 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles TIM1 capture compare interrupt.
|
||||
*/
|
||||
void TIM1_CC_IRQHandler(void)
|
||||
{
|
||||
/* USER CODE BEGIN TIM1_CC_IRQn 0 */
|
||||
|
||||
/* USER CODE END TIM1_CC_IRQn 0 */
|
||||
HAL_TIM_IRQHandler(&htim1);
|
||||
/* USER CODE BEGIN TIM1_CC_IRQn 1 */
|
||||
|
||||
/* USER CODE END TIM1_CC_IRQn 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles USB On The Go FS global interrupt.
|
||||
*/
|
||||
|
||||
+8
-7
@@ -11,6 +11,8 @@
|
||||
#include "adc.h"
|
||||
#include "tim.h"
|
||||
|
||||
#include "math.h"
|
||||
|
||||
static void test_read_ADC(void);
|
||||
|
||||
static int test_base = 0;
|
||||
@@ -46,6 +48,9 @@ static void test_read_ADC(void) {
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t testcnt[16];
|
||||
static int tcidx = 0;
|
||||
|
||||
void HAL_ADCEx_InjectedConvCpltCallback(ADC_HandleTypeDef* hadc) {
|
||||
assert(hadc == &hadc2);
|
||||
|
||||
@@ -56,13 +61,9 @@ void HAL_ADCEx_InjectedConvCpltCallback(ADC_HandleTypeDef* hadc) {
|
||||
test++;
|
||||
} else {
|
||||
test2++;
|
||||
testcnt[tcidx] = cnt - 2048;
|
||||
if(++tcidx == 16)
|
||||
tcidx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void HAL_TIM_OC_DelayElapsedCallback(TIM_HandleTypeDef *htim) {
|
||||
|
||||
//We only expect the timing driving channel to trigger an interrupt.
|
||||
assert(htim->Channel == HAL_TIM_ACTIVE_CHANNEL_4);
|
||||
test_base++;
|
||||
|
||||
}
|
||||
|
||||
@@ -394,10 +394,6 @@ void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base)
|
||||
/* USER CODE END TIM1_MspDeInit 0 */
|
||||
/* Peripheral clock disable */
|
||||
__HAL_RCC_TIM1_CLK_DISABLE();
|
||||
|
||||
/* Peripheral interrupt Deinit*/
|
||||
HAL_NVIC_DisableIRQ(TIM1_CC_IRQn);
|
||||
|
||||
/* USER CODE BEGIN TIM1_MspDeInit 1 */
|
||||
|
||||
/* USER CODE END TIM1_MspDeInit 1 */
|
||||
|
||||
Reference in New Issue
Block a user