From 43758c2d8f42faba0b419af4ef7336437586d123 Mon Sep 17 00:00:00 2001 From: ThinkPad-T460P Date: Wed, 6 Jan 2021 12:25:37 +0800 Subject: [PATCH] fault handler message output and exit4(som_sys_reset_pin) --- Core/Src/stm32f1xx_it.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/Core/Src/stm32f1xx_it.c b/Core/Src/stm32f1xx_it.c index b05afac..eff17e3 100644 --- a/Core/Src/stm32f1xx_it.c +++ b/Core/Src/stm32f1xx_it.c @@ -91,7 +91,7 @@ void NMI_Handler(void) void HardFault_Handler(void) { /* USER CODE BEGIN HardFault_IRQn 0 */ - + Log(fatal,"HardFault_Handler"); /* USER CODE END HardFault_IRQn 0 */ while (1) { @@ -106,7 +106,7 @@ void HardFault_Handler(void) void MemManage_Handler(void) { /* USER CODE BEGIN MemoryManagement_IRQn 0 */ - + Log(fatal,"MemManage_Handler"); /* USER CODE END MemoryManagement_IRQn 0 */ while (1) { @@ -121,7 +121,7 @@ void MemManage_Handler(void) void BusFault_Handler(void) { /* USER CODE BEGIN BusFault_IRQn 0 */ - + Log(fatal,"BusFault_Handler"); /* USER CODE END BusFault_IRQn 0 */ while (1) { @@ -136,7 +136,7 @@ void BusFault_Handler(void) void UsageFault_Handler(void) { /* USER CODE BEGIN UsageFault_IRQn 0 */ - + Log(fatal,"UsageFault_Handler"); /* USER CODE END UsageFault_IRQn 0 */ while (1) { @@ -248,6 +248,20 @@ void EXTI3_IRQHandler(void) /* USER CODE END EXTI3_IRQn 1 */ } +/** + * @brief This function handles EXTI line4 interrupt. + */ +void EXTI4_IRQHandler(void) +{ + /* USER CODE BEGIN EXTI4_IRQn 0 */ + + /* USER CODE END EXTI4_IRQn 0 */ + HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_4); + /* USER CODE BEGIN EXTI4_IRQn 1 */ + + /* USER CODE END EXTI4_IRQn 1 */ +} + /** * @brief This function handles DMA1 channel1 global interrupt. */