From cfce9f0125e4d2c7ec685c5b55f2ccad69cb15f3 Mon Sep 17 00:00:00 2001 From: Grzegorz Gajoch Date: Tue, 30 Jul 2019 09:35:11 +0200 Subject: [PATCH] Use CubeMX structure --- Core/Src/stm32f1xx_it.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Src/stm32f1xx_it.c b/Core/Src/stm32f1xx_it.c index 30822ce..d1f6e71 100644 --- a/Core/Src/stm32f1xx_it.c +++ b/Core/Src/stm32f1xx_it.c @@ -416,7 +416,7 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) { - TIM2->CNT = 800; + htim2.Instance->CNT = 800; HAL_TIM_Base_Start_IT(&htim2); HAL_NVIC_DisableIRQ(EXTI0_IRQn); HAL_NVIC_DisableIRQ(EXTI1_IRQn);