diff --git a/nucleo-wb55-ble/Core/Inc/stm32wbxx_it.h b/nucleo-wb55-ble/Core/Inc/stm32wbxx_it.h index e06a700..b01d95d 100644 --- a/nucleo-wb55-ble/Core/Inc/stm32wbxx_it.h +++ b/nucleo-wb55-ble/Core/Inc/stm32wbxx_it.h @@ -56,6 +56,7 @@ void SVC_Handler(void); void DebugMon_Handler(void); void PendSV_Handler(void); void SysTick_Handler(void); +void EXTI4_IRQHandler(void); void USB_LP_IRQHandler(void); void HSEM_IRQHandler(void); /* USER CODE BEGIN EFP */ diff --git a/nucleo-wb55-ble/Core/Src/main.c b/nucleo-wb55-ble/Core/Src/main.c index b1030f1..0c3bdaf 100644 --- a/nucleo-wb55-ble/Core/Src/main.c +++ b/nucleo-wb55-ble/Core/Src/main.c @@ -299,6 +299,10 @@ static void MX_GPIO_Init(void) } /* USER CODE BEGIN 4 */ + +void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) { + HAL_NVIC_SystemReset(); +} void PeriphClock_Config(void) { RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = { 0 }; diff --git a/nucleo-wb55-ble/Core/Src/stm32wbxx_it.c b/nucleo-wb55-ble/Core/Src/stm32wbxx_it.c index 8c1e231..8a290fd 100644 --- a/nucleo-wb55-ble/Core/Src/stm32wbxx_it.c +++ b/nucleo-wb55-ble/Core/Src/stm32wbxx_it.c @@ -200,6 +200,20 @@ void SysTick_Handler(void) /* please refer to the startup file (startup_stm32wbxx.s). */ /******************************************************************************/ +/** + * @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 USB low priority interrupt, USB wake-up interrupt through EXTI line 28. */