I am trying to toggle led(PA5) with timer and interrupt but it's not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-05-27 1:05 AM
using Nucleof446RE
I have set my prescaler value -700
ARR- 60628
TIM6_clk =85MHz
Which would create 0.5s delay in toggle led PA5
and also added (main code)
HAL_TIM_Base_Start(&htim);
And
Void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim){
HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_5);
}
Code runs without any error
But the led is not blinking I am confused what is problem
I am newbie in st community
Just started using STM32 4 days ago
- Labels:
-
Interrupt
-
STM32F4 Series
-
TIM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-05-27 2:15 AM
In debugger, read out and check/post content of TIM and relevant GPIO registers.
Also make sure you enable the interrupt in timer and in NVIC, and you have written and compiled the proper ISR with proper name. Generic interrupt-related checklist here.
JW
